fix: wrong pos when pressing Backspace

Editor's state including last pos and cursor range need to be cleared
when callling block-handler/edit-block!
This commit is contained in:
Tienson Qin
2024-06-21 18:29:48 +08:00
parent 797b13ac78
commit f16e972709
2 changed files with 11 additions and 4 deletions

View File

@@ -193,6 +193,7 @@
(when-not config/publishing?
(p/do!
(state/pub-event! [:editor/save-code-editor])
(state/clear-edit! {:clear-editing-block? false})
(when-let [block-id (:block/uuid block)]
(let [repo (state/get-current-repo)
db-graph? (config/db-based-graph? repo)