Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@uppy/dashboard: do not allow drag&drop of file preview #5650

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Murderlon
Copy link
Member

@Murderlon Murderlon commented Feb 17, 2025

Closes #5639

Browsers have subtle differences when which makes it hard to detect a duplicate between a generated file preview and the original file so we simply do not allow drag & drop of the generated file preview.

@Murderlon Murderlon self-assigned this Feb 17, 2025
Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/dashboard/lib/components/FilePreview.js b/packages/@uppy/dashboard/lib/components/FilePreview.js
index fd25afe..35cc0d9 100644
--- a/packages/@uppy/dashboard/lib/components/FilePreview.js
+++ b/packages/@uppy/dashboard/lib/components/FilePreview.js
@@ -6,6 +6,7 @@ export default function FilePreview(props) {
   } = props;
   if (file.preview) {
     return h("img", {
+      draggable: false,
       className: "uppy-Dashboard-Item-previewImg",
       alt: file.name,
       src: file.preview,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dragging already added file and dropping it, duplicates file
1 participant