fix: can't create a new block when delete all the blocks

This commit is contained in:
Tienson Qin
2021-04-30 22:34:38 +08:00
parent 0ae0634d04
commit c0df49a24a
4 changed files with 5 additions and 3 deletions

View File

@@ -702,7 +702,7 @@
([edit-input-id content block cursor-range]
(set-editing! edit-input-id content block cursor-range true))
([edit-input-id content block cursor-range move-cursor?]
(when edit-input-id
(when (and edit-input-id block)
(let [block-element (gdom/getElement (string/replace edit-input-id "edit-block" "ls-block"))
container (util/get-block-container block-element)
block (if container