mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 21:06:11 -05:00
Merge pull request #3404 from penpot/superalex-fix-select-text-javascript-function
🐛 Fix select text javascript function
This commit is contained in:
commit
3c9d3bd5af
2 changed files with 2 additions and 2 deletions
|
@ -207,7 +207,7 @@
|
||||||
(on-focus event))
|
(on-focus event))
|
||||||
|
|
||||||
(when select-on-focus?
|
(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
|
;; 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})))))
|
(.addEventListener target "mouseup" dom/prevent-default #js {:once true})))))
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,7 @@
|
||||||
|
|
||||||
(defn select-text!
|
(defn select-text!
|
||||||
[^js node]
|
[^js node]
|
||||||
(when (some? node)
|
(when (and (some? node) (some? (unchecked-get node "select")))
|
||||||
(.select ^js node)))
|
(.select ^js node)))
|
||||||
|
|
||||||
(defn ^boolean equals?
|
(defn ^boolean equals?
|
||||||
|
|
Loading…
Add table
Reference in a new issue