From 13dafac00b53fb8b6596109b38e75f4f6dc5686f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Tue, 9 Jul 2024 08:24:06 +0200 Subject: [PATCH] Fix double pasting after switching chats --- src/hooks/useHtmlPaste/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useHtmlPaste/index.ts b/src/hooks/useHtmlPaste/index.ts index 03a2ea7c39e8..8f4841f81427 100644 --- a/src/hooks/useHtmlPaste/index.ts +++ b/src/hooks/useHtmlPaste/index.ts @@ -156,7 +156,7 @@ const useHtmlPaste: UseHtmlPaste = (textInputRef, preHtmlPasteCallback, removeLi unsubscribeFocus(); unsubscribeBlur(); } - document.removeEventListener('paste', handlePaste, true); + document.removeEventListener('paste', handlePaste); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []);