fix: indent/outdent cursor move for embedded blocks

This commit is contained in:
Tienson Qin
2023-08-28 13:33:36 +08:00
parent f2eedc5972
commit 19e7920448
2 changed files with 4 additions and 2 deletions

View File

@@ -342,7 +342,8 @@
[block-id direction retry-times current-container-id]
(let [container-id (when current-container-id
(string/replace current-container-id "edit-block" "ls-block"))]
(when-let [target (if (and (< retry-times 3) container-id)
(when-let [target (if (and (< retry-times 2) container-id)
(gdom/getElement container-id)
(or (get-nearby-block-by-id block-id direction)
(util/get-first-block-by-id block-id)))]