fix(ux): sometimes up/down block selection not work

pull/11293/head
charlie 2024-04-28 15:34:22 +08:00
parent 0eb44c0090
commit 43b5c575ad
2 changed files with 5 additions and 2 deletions

View File

@ -3270,7 +3270,8 @@
(state/selection?)
(select-up-down direction)
;; if there is an edit-input-id set, we are probably still on editing mode, that is not fully initialized
;; if there is an edit-input-id set, we are probably still on editing mode,
;; that is not fully initialized
(not (state/get-edit-input-id))
(select-first-last direction)))
nil))

View File

@ -987,7 +987,9 @@ Similar to re-frame subscriptions"
[]
(when-not (exists? js/process)
(or
(when-let [node @*editor-editing-ref]
(when-let [node (and (some-> @*editor-editing-ref
;; check editing input is visible
(.closest "body")) @*editor-editing-ref)]
(some-> (dom/sel1 node "textarea")
(gobj/get "id")))
(try