fix: lost editor cursor when pressing Enter to undent

This commit is contained in:
Tienson Qin
2024-06-17 15:18:51 +08:00
parent 39c4a160c2
commit b67035bc9b
3 changed files with 9 additions and 7 deletions

View File

@@ -173,7 +173,8 @@
(defn- edit-block-aux
[repo block content text-range {:keys [container-id]}]
(when block
(state/clear-edit!)
(when (not= (:db/id block) (:db/id (state/get-edit-block)))
(state/clear-edit!))
(let [container-id (or container-id
(state/get-current-editor-container-id)
:unknown-container)]