diff --git a/frontend/src/components/ai-elements/prompt-input.tsx b/frontend/src/components/ai-elements/prompt-input.tsx index 4609c43d3..ff19be843 100644 --- a/frontend/src/components/ai-elements/prompt-input.tsx +++ b/frontend/src/components/ai-elements/prompt-input.tsx @@ -911,19 +911,6 @@ export const PromptInputTextarea = ({ 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 = (event) => {