mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
Dont submit token when text is selected
This commit is contained in:
parent
5806ae7426
commit
5bccfa9e2f
1 changed files with 2 additions and 1 deletions
|
@ -142,7 +142,8 @@
|
|||
enter? (kbd/enter? event)
|
||||
value (-> event dom/get-target dom/get-value)
|
||||
caret-at-beginning? (nil? (.. event -target -selectionStart))
|
||||
delete-token? (and backspace? caret-at-beginning?)
|
||||
no-text-selected? (str/empty? (.toString (js/document.getSelection)))
|
||||
delete-token? (and backspace? caret-at-beginning? no-text-selected?)
|
||||
replace-token-with-value? (and enter? (seq (str/trim value)))]
|
||||
(cond
|
||||
delete-token? (do
|
||||
|
|
Loading…
Add table
Reference in a new issue