Skip to content

Commit

Permalink
fix: wait a bit longer
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Mar 16, 2023
1 parent aad133e commit ea98097
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/frontend/handler/history.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
(editor/save-current-block!)
(let [{:keys [editor-cursor]} (undo-redo/undo)]
;; Rendering may not be finished
(js/setTimeout #(restore-cursor! editor-cursor) 10))
(js/setTimeout #(restore-cursor! editor-cursor) 20))
(state/set-editor-op! nil))

(defn redo!
Expand All @@ -34,5 +34,5 @@
(state/set-editor-op! :redo)
(state/clear-editor-action!)
(let [{:keys [editor-cursor]} (undo-redo/redo)]
(js/setTimeout #(restore-cursor! editor-cursor) 10))
(js/setTimeout #(restore-cursor! editor-cursor) 20))
(state/set-editor-op! nil))

0 comments on commit ea98097

Please sign in to comment.