0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

🐛 Fix select text javascript function

This commit is contained in:
Alejandro Alonso 2023-07-11 09:51:08 +02:00
parent 2d57523e00
commit 8e1c4238cb
2 changed files with 2 additions and 2 deletions

View file

@ -207,7 +207,7 @@
(on-focus event))
(when select-on-focus?
(dom/select-text! event)
(dom/select-text! target)
;; In webkit browsers the mouseup event will be called after the on-focus causing and unselect
(.addEventListener target "mouseup" dom/prevent-default #js {:once true})))))

View file

@ -234,7 +234,7 @@
(defn select-text!
[^js node]
(when (some? node)
(when (and (some? node) (some? (unchecked-get node "select")))
(.select ^js node)))
(defn ^boolean equals?