diff --git a/src/components/modals/Modal.jsx b/src/components/modals/Modal.jsx index b3518ae..7fc1393 100644 --- a/src/components/modals/Modal.jsx +++ b/src/components/modals/Modal.jsx @@ -19,6 +19,17 @@ class Modal extends React.Component { underlayClickExits: true } + // See + onClose = () => { + if (document.activeElement) { + document.activeElement.blur(); + } + + setImmediate(() => { + this.props.onOpenToggle(false); + }); + } + getApplicationNode() { return document.getElementById('app'); } @@ -32,7 +43,7 @@ class Modal extends React.Component { getApplicationNode={this.getApplicationNode} data-wd-key={this.props["data-wd-key"]} verticallyCenter={true} - onExit={() => this.props.onOpenToggle(false)} + onExit={this.onClose} >
{this.props.title}