0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -05:00

🐛 Fixes paste in workspace inputs

This commit is contained in:
alonso.torres 2021-01-13 15:04:34 +01:00
parent b616efd75c
commit 292faec46f

View file

@ -544,8 +544,9 @@
(fn [event]
;; We disable the paste just after mouse-up of a middle button so when panning won't
;; paste the content into the workspace
(when (not @disable-paste)
(st/emit! (dw/paste-from-event event)))))
(let [tag-name (-> event dom/get-target dom/get-tag-name)]
(when (and (not (#{"INPUT" "TEXTAREA"} tag-name)) (not @disable-paste))
(st/emit! (dw/paste-from-event event))))))
on-resize
(mf/use-callback