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:
parent
b097f73b13
commit
8850fd8894
1 changed files with 6 additions and 4 deletions
|
@ -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))))))]
|
||||
|
|
Loading…
Reference in a new issue