fix: new created block blink

This commit is contained in:
Tienson Qin
2023-09-11 16:16:32 +08:00
parent 46838785b1
commit 9d8d20792e

View File

@@ -378,9 +378,7 @@
edit-input-id (if (uuid? id)
(get-edit-input-id-with-block-id id direction retry-times nil)
(let [id (str (subs id 0 (- (count id) 36)) block-id)]
(if (gdom/getElement id)
(string/replace id "ls-block" "edit-block")
(get-edit-input-id-with-block-id block-id direction retry-times id))))]
(string/replace id "ls-block" "edit-block")))]
(if edit-input-id
(do
(state/set-editing! edit-input-id content block text-range)