mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🔧 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:
parent
7d633f4018
commit
2da0a7661d
1 changed files with 2 additions and 0 deletions
|
@ -108,6 +108,8 @@ const EditMessage = ({
|
||||||
removeFocusOutlines,
|
removeFocusOutlines,
|
||||||
)}
|
)}
|
||||||
onPaste={(e) => {
|
onPaste={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
const pastedData = e.clipboardData.getData('text/plain');
|
const pastedData = e.clipboardData.getData('text/plain');
|
||||||
const textArea = textAreaRef.current;
|
const textArea = textAreaRef.current;
|
||||||
if (!textArea) {
|
if (!textArea) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue