Skip to content

Commit

Permalink
Merge 64e76ec into 6dd9f25
Browse files Browse the repository at this point in the history
  • Loading branch information
ztplz committed Mar 7, 2019
2 parents 6dd9f25 + 64e76ec commit 63eb400
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,17 @@ export default class Trigger extends React.Component {
};

onDocumentClick = (event) => {
if (this.props.mask && !this.props.maskClosable) {
return;
}

const target = event.target;
const root = findDOMNode(this);
if (!contains(root, target) && !this.hasPopupMouseDown) {
this.close();
}
setTimeout(function() {
if (this.props.mask && !this.props.maskClosable) {
return;
}

const target = event.target;
const root = findDOMNode(this);
if (!contains(root, target) && !this.hasPopupMouseDown) {
this.close();
}
}, 70);
}

getPopupDomNode() {
Expand Down

0 comments on commit 63eb400

Please sign in to comment.