From fa1b5d4cf897ecc8c73c0c508fe0177ff49fc84f Mon Sep 17 00:00:00 2001 From: Jon Packer Date: Thu, 5 Dec 2019 21:30:58 +0100 Subject: [PATCH] Don't swallow blur, keydown and mousedown events --- src/Handle.jsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Handle.jsx b/src/Handle.jsx index ee7ca1905..2e53eaa1b 100644 --- a/src/Handle.jsx +++ b/src/Handle.jsx @@ -34,17 +34,26 @@ export default class Handle extends React.Component { } } - handleMouseDown = () => { + handleMouseDown = (event) => { // fix https://github.com/ant-design/ant-design/issues/15324 this.focus(); + if (this.props.onMouseDown) { + this.props.onMouseDown(event); + } } - handleBlur = () => { + handleBlur = (event) => { this.setClickFocus(false); + if (this.props.onBlur) { + this.props.onBlur(event); + } } - handleKeyDown = () => { + handleKeyDown = (event) => { this.setClickFocus(false); + if (this.props.onKeyDown) { + this.props.onKeyDown(event); + } } clickFocus() {