Skip to content

Commit

Permalink
Fix Link and Image popover button not working in React 17 (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
iPilotte authored May 2, 2021
1 parent 8c81622 commit b6c30d9
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, true);
document.addEventListener('keydown', this._onDocumentKeydown);
if (this._inputRef) {
this._inputRef.focus();
}
}

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

Expand Down

1 comment on commit b6c30d9

@MartinSilvaMX
Copy link

@MartinSilvaMX MartinSilvaMX commented on b6c30d9 Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have an estimated date to release this fix at npm?

Please sign in to comment.