fix: undo block deletion needs multiple steps (#8833)

fix: undo block deletion needs multiple steps

---------

Co-authored-by: charlie <xyhp915@qq.com>
This commit is contained in:
Tienson Qin
2023-03-21 19:35:40 +08:00
committed by GitHub
parent 24735891dc
commit 0eab5ebef4
5 changed files with 93 additions and 37 deletions

View File

@@ -1119,7 +1119,8 @@ Similar to re-frame subscriptions"
(when container
{:last-edit-block edit-block
:container (gobj/get container "id")
:pos (cursor/pos (gdom/getElement edit-input-id))})))
:pos (or (cursor/pos (gdom/getElement edit-input-id))
(count (:block/content edit-block)))})))
(defn clear-edit!
[]