0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

🐛 Fix problem dragging in draft/projects screen

This commit is contained in:
alonso.torres 2024-03-15 14:52:38 +01:00
parent b097f73b13
commit 8850fd8894

View file

@ -419,8 +419,9 @@
on-drag-enter
(mf/use-fn
(fn [e]
(when (or (dnd/has-type? e "Files")
(dnd/has-type? e "application/x-moz-file"))
(when (and (not (dnd/has-type? e "penpot/files"))
(or (dnd/has-type? e "Files")
(dnd/has-type? e "application/x-moz-file")))
(dom/prevent-default e)
(reset! dragging? true))))
@ -440,8 +441,9 @@
on-drop
(mf/use-fn
(fn [e]
(when (or (dnd/has-type? e "Files")
(dnd/has-type? e "application/x-moz-file"))
(when (and (not (dnd/has-type? e "penpot/files"))
(or (dnd/has-type? e "Files")
(dnd/has-type? e "application/x-moz-file")))
(dom/prevent-default e)
(reset! dragging? false)
(import-files (.-files (.-dataTransfer e))))))]