mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
🐛 Fix drag and drop files from browser or file explorer under circumstances
This commit is contained in:
parent
b2b91bfa57
commit
d0ab0bccb9
2 changed files with 10 additions and 1 deletions
|
@ -53,6 +53,7 @@
|
||||||
- Select children after ungroup action [Taiga #4917](https://tree.taiga.io/project/penpot/issue/4917)
|
- Select children after ungroup action [Taiga #4917](https://tree.taiga.io/project/penpot/issue/4917)
|
||||||
- Fix problem with guides not showing when moving over nested frames [Taiga #4905](https://tree.taiga.io/project/penpot/issue/4905)
|
- Fix problem with guides not showing when moving over nested frames [Taiga #4905](https://tree.taiga.io/project/penpot/issue/4905)
|
||||||
- Fix change email and password for users signed in via social login [Taiga #4273](https://tree.taiga.io/project/penpot/issue/4273)
|
- Fix change email and password for users signed in via social login [Taiga #4273](https://tree.taiga.io/project/penpot/issue/4273)
|
||||||
|
- Fix drag and drop files from browser or file explorer under circumstances [Taiga #5054](https://tree.taiga.io/project/penpot/issue/5054)
|
||||||
|
|
||||||
### :heart: Community contributions by (Thank you!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
- To @ondrejkonec: for contributing to the code with:
|
- To @ondrejkonec: for contributing to the code with:
|
||||||
|
|
|
@ -434,7 +434,15 @@
|
||||||
(:id component)
|
(:id component)
|
||||||
(gpt/point final-x final-y))))
|
(gpt/point final-x final-y))))
|
||||||
|
|
||||||
;; Will trigger when the user drags an image from a browser to the viewport
|
;; Will trigger when the user drags an image from a browser to the viewport (firefox and chrome do it a bit different depending on the origin)
|
||||||
|
(dnd/has-type? event "Files")
|
||||||
|
(let [files (dnd/get-files event)
|
||||||
|
params {:file-id (:id file)
|
||||||
|
:position viewport-coord
|
||||||
|
:blobs (seq files)}]
|
||||||
|
(st/emit! (dwm/upload-media-workspace params)))
|
||||||
|
|
||||||
|
;; Will trigger when the user drags an image from a browser to the viewport (firefox and chrome do it a bit different depending on the origin)
|
||||||
(dnd/has-type? event "text/uri-list")
|
(dnd/has-type? event "text/uri-list")
|
||||||
(let [data (dnd/get-data event "text/uri-list")
|
(let [data (dnd/get-data event "text/uri-list")
|
||||||
lines (str/lines data)
|
lines (str/lines data)
|
||||||
|
|
Loading…
Reference in a new issue