fix: can't edit inline code block

/calc has been fixed too for db version.
This commit is contained in:
Tienson Qin
2024-10-07 13:00:29 +08:00
parent 3f75a21567
commit e1ed2c36ee
3 changed files with 20 additions and 8 deletions

View File

@@ -472,7 +472,9 @@
(vreset! *cursor-curr nil)
(vreset! *cursor-prev nil)))
(.on editor "focus" (fn [_e]
(when-not (= (:block/uuid edit-block) (:block/uuid (state/get-edit-block)))
(when (and
(contains? #{:code} (:logseq.property.node/display-type edit-block))
(not= (:block/uuid edit-block) (:block/uuid (state/get-edit-block))))
(editor-handler/edit-block! edit-block :max))
(state/set-editing-block-dom-id! (:block-parent-id config))
(state/set-block-component-editing-mode! true)