The open source coding agent.
TypeScript
fix(app): fix image dragging in project edit dialog (#6700)
Albin Groen265cbaea7c09
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsxindex 6dfa5e024b7..02f584b99c6 100644--- a/packages/app/src/components/prompt-input.tsx+++ b/packages/app/src/components/prompt-input.tsx@@ -302,6 +302,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {}const handleGlobalDragOver = (event: DragEvent) => {+ if (dialog.active) return+event.preventDefault()const hasFiles = event.dataTransfer?.types.includes("Files")if (hasFiles) {@@ -310,6 +312,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {}const handleGlobalDragLeave = (event: DragEvent) => {+ if (dialog.active) return+// relatedTarget is null when leaving the document windowif (!event.relatedTarget) {setStore("dragging", false)@@ -317,6 +321,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {}const handleGlobalDrop = async (event: DragEvent) => {+ if (dialog.active) return+event.preventDefault()setStore("dragging", false)