mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-05-02 17:07:13 +00:00
Patch bug with pasted text not being detected (#2386)
This commit is contained in:
parent
30d2f0914a
commit
300e141736
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue