diff --git a/apps/web/src/components/general/global-drop-zone.tsx b/apps/web/src/components/general/global-drop-zone.tsx index 7c5008a..c735846 100644 --- a/apps/web/src/components/general/global-drop-zone.tsx +++ b/apps/web/src/components/general/global-drop-zone.tsx @@ -243,8 +243,13 @@ export function GlobalDropZone({ onSuccess, children, currentFolderId }: GlobalD const handlePaste = useCallback( (event: ClipboardEvent) => { - event.preventDefault(); - event.stopPropagation(); + const target = event.target as HTMLElement; + const isInput = target.tagName === "INPUT" || target.tagName === "TEXTAREA"; + const isPasswordInput = target.tagName === "INPUT" && (target as HTMLInputElement).type === "password"; + + if (isInput && !isPasswordInput) { + return; + } const items = event.clipboardData?.items; if (!items) return; @@ -253,6 +258,9 @@ export function GlobalDropZone({ onSuccess, children, currentFolderId }: GlobalD if (imageItems.length === 0) return; + event.preventDefault(); + event.stopPropagation(); + const newUploads: FileUpload[] = []; imageItems.forEach((item) => {