mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: remove setTimeout for setting editor args temporally
This commit is contained in:
@@ -382,7 +382,8 @@
|
||||
;; if we quickly click into a block when editing another block,
|
||||
;; this will happen before the `will-unmount` event, which will
|
||||
;; lost the content in the editing block.
|
||||
(js/setTimeout #(state/set-editor-args! (:rum/args state)) 20)
|
||||
(state/set-editor-args! (:rum/args state))
|
||||
;; (js/setTimeout #(state/set-editor-args! (:rum/args state)) 20)
|
||||
state)}
|
||||
(mixins/event-mixin setup-key-listener!)
|
||||
(shortcut/mixin :shortcut.handler/block-editing-only)
|
||||
|
||||
@@ -1570,7 +1570,7 @@
|
||||
(defn get-matched-commands
|
||||
[input]
|
||||
(try
|
||||
(let [edit-content (gobj/get input "value")
|
||||
(let [edit-content (or (gobj/get input "value") "")
|
||||
pos (util/get-input-pos input)
|
||||
last-slash-caret-pos (:pos @*slash-caret-pos)
|
||||
last-command (and last-slash-caret-pos (subs edit-content last-slash-caret-pos pos))]
|
||||
|
||||
Reference in New Issue
Block a user