0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-09 08:38:15 -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] (fn [event]
;; We disable the paste just after mouse-up of a middle button so when panning won't ;; We disable the paste just after mouse-up of a middle button so when panning won't
;; paste the content into the workspace ;; paste the content into the workspace
(when (not @disable-paste) (let [tag-name (-> event dom/get-target dom/get-tag-name)]
(st/emit! (dw/paste-from-event event))))) (when (and (not (#{"INPUT" "TEXTAREA"} tag-name)) (not @disable-paste))
(st/emit! (dw/paste-from-event event))))))
on-resize on-resize
(mf/use-callback (mf/use-callback