Skip to content

Commit

Permalink
Merge pull request #25424 from daordonez11/avoid-paste-listener-active
Browse files Browse the repository at this point in the history
Revert hotfix: Move again to avoid listener still active

(cherry picked from commit 332eeca)
  • Loading branch information
bondydaa authored and OSBotify committed Aug 17, 2023
1 parent 0d5b063 commit 22aa31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Composer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ function Composer({
return () => {
unsubscribeFocus();
unsubscribeBlur();
document.removeEventListener('paste', handlePaste);
// eslint-disable-next-line es/no-optional-chaining
if (!textInput.current) {
return;
}
document.removeEventListener('paste', handlePaste);
textInput.current.removeEventListener('wheel', handleWheel);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 22aa31a

Please sign in to comment.