mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 11:26:26 +00:00
perf: no need to clear-edit! when editing new block
This commit is contained in:
@@ -67,8 +67,9 @@
|
||||
([input n] (move-cursor-to input n false))
|
||||
([input n delay?]
|
||||
(.setSelectionRange input n n)
|
||||
(let [focus #(.focus input)]
|
||||
(if delay? (js/setTimeout focus 16) (focus)))))
|
||||
(when-not (= js/document.activeElement input)
|
||||
(let [focus #(.focus input)]
|
||||
(if delay? (js/setTimeout focus 16) (focus))))))
|
||||
|
||||
(defn move-cursor-forward
|
||||
([input]
|
||||
|
||||
Reference in New Issue
Block a user