🔧 fix(EditMessage): duplicate text when pasting (#1970)

* fix(EditMessage): duplicate text when pasting on chromium

* add back paste data handling, prevent default behavior

---------

Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
This commit is contained in:
Marco Beretta
2024-03-04 22:27:34 +01:00
committed by GitHub
parent 7d633f4018
commit 2da0a7661d

View File

@@ -108,6 +108,8 @@ const EditMessage = ({
removeFocusOutlines,
)}
onPaste={(e) => {
e.preventDefault();
const pastedData = e.clipboardData.getData('text/plain');
const textArea = textAreaRef.current;
if (!textArea) {