Skip to content

Commit

Permalink
Patch bug with pasted text not being detected (#2386)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat authored Sep 28, 2024
1 parent 30d2f09 commit 300e141
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ export default function PromptInput({
}

const pasteText = e.clipboardData.getData("text/plain");
if (pasteText) setPromptInput((prev) => prev + pasteText.trim());
if (pasteText) {
const newPromptInput = promptInput + pasteText.trim();
setPromptInput(newPromptInput);
onChange({ target: { value: newPromptInput } });
}
return;
};

Expand Down

0 comments on commit 300e141

Please sign in to comment.