Revert "Composer: remove click listener on unmount"

This reverts commit 136965acdd.
This commit is contained in:
Alex Gleason 2020-09-28 19:05:45 -05:00
parent ffab2ec2ef
commit 18d08a3630
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -182,10 +182,6 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
document.addEventListener('click', this.handleClick, true);
}
componentWillUnmount() {
document.removeEventListener('click', this.handleClick, true);
}
componentDidUpdate(prevProps, prevState) {
const { suggestions } = this.props;
if (suggestions !== prevProps.suggestions && suggestions.size > 0 && prevState.suggestionsHidden && prevState.focused) {