mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 00:40:30 -05:00
🐛 Fix problem dragging in draft/projects screen
This commit is contained in:
parent
b097f73b13
commit
8850fd8894
1 changed files with 6 additions and 4 deletions
|
@ -419,8 +419,9 @@
|
||||||
on-drag-enter
|
on-drag-enter
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn [e]
|
(fn [e]
|
||||||
(when (or (dnd/has-type? e "Files")
|
(when (and (not (dnd/has-type? e "penpot/files"))
|
||||||
(dnd/has-type? e "application/x-moz-file"))
|
(or (dnd/has-type? e "Files")
|
||||||
|
(dnd/has-type? e "application/x-moz-file")))
|
||||||
(dom/prevent-default e)
|
(dom/prevent-default e)
|
||||||
(reset! dragging? true))))
|
(reset! dragging? true))))
|
||||||
|
|
||||||
|
@ -440,8 +441,9 @@
|
||||||
on-drop
|
on-drop
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn [e]
|
(fn [e]
|
||||||
(when (or (dnd/has-type? e "Files")
|
(when (and (not (dnd/has-type? e "penpot/files"))
|
||||||
(dnd/has-type? e "application/x-moz-file"))
|
(or (dnd/has-type? e "Files")
|
||||||
|
(dnd/has-type? e "application/x-moz-file")))
|
||||||
(dom/prevent-default e)
|
(dom/prevent-default e)
|
||||||
(reset! dragging? false)
|
(reset! dragging? false)
|
||||||
(import-files (.-files (.-dataTransfer e))))))]
|
(import-files (.-files (.-dataTransfer e))))))]
|
||||||
|
|
Loading…
Reference in a new issue