Skip to content

Commit b6c30d9

Browse files
authored
Fix Link and Image popover button not working in React 17 (#399)
1 parent 8c81622 commit b6c30d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui/InputPopover.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ export default class InputPopover extends Component {
4848
}
4949

5050
componentDidMount() {
51-
document.addEventListener('click', this._onDocumentClick);
51+
document.addEventListener('click', this._onDocumentClick, true);
5252
document.addEventListener('keydown', this._onDocumentKeydown);
5353
if (this._inputRef) {
5454
this._inputRef.focus();
5555
}
5656
}
5757

5858
componentWillUnmount() {
59-
document.removeEventListener('click', this._onDocumentClick);
59+
document.removeEventListener('click', this._onDocumentClick, true);
6060
document.removeEventListener('keydown', this._onDocumentKeydown);
6161
}
6262

0 commit comments

Comments
 (0)