Skip to content

Commit

Permalink
fix click event fired after click on InputPopover button
Browse files Browse the repository at this point in the history
  • Loading branch information
iPilotte committed Feb 6, 2021
1 parent 8c81622 commit 8b7ac24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/InputPopover.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ export default class InputPopover extends Component {
}

componentDidMount() {
document.addEventListener('click', this._onDocumentClick);
document.addEventListener('click', this._onDocumentClick, {capture: true});
document.addEventListener('keydown', this._onDocumentKeydown);
if (this._inputRef) {
this._inputRef.focus();
}
}

componentWillUnmount() {
document.removeEventListener('click', this._onDocumentClick);
document.removeEventListener('click', this._onDocumentClick, {capture: true});
document.removeEventListener('keydown', this._onDocumentKeydown);
}

Expand Down

0 comments on commit 8b7ac24

Please sign in to comment.