mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-10 09:25:57 +00:00
fix(ux): remove Backspace shortcut for deleting prompt attachments (#3410)
* Remove backspace attachment deletion * Fix the lint error --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -911,19 +911,6 @@ export const PromptInputTextarea = ({
|
|||||||
|
|
||||||
form?.requestSubmit();
|
form?.requestSubmit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove last attachment when Backspace is pressed and textarea is empty
|
|
||||||
if (
|
|
||||||
e.key === "Backspace" &&
|
|
||||||
e.currentTarget.value === "" &&
|
|
||||||
attachments.files.length > 0
|
|
||||||
) {
|
|
||||||
e.preventDefault();
|
|
||||||
const lastAttachment = attachments.files.at(-1);
|
|
||||||
if (lastAttachment) {
|
|
||||||
attachments.remove(lastAttachment.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handlePaste: ClipboardEventHandler<HTMLTextAreaElement> = (event) => {
|
const handlePaste: ClipboardEventHandler<HTMLTextAreaElement> = (event) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user