clear selection if necessary

pull/10763/head
Mega Yu 2023-07-19 11:16:05 +08:00 committed by Tienson Qin
parent b4b5a949d7
commit 13773c9fac
1 changed files with 2 additions and 1 deletions

View File

@ -2167,7 +2167,8 @@
(if (some #(= block-dom-element %) (state/get-selection-blocks))
(state/drop-selection-block! block-dom-element)
(state/conj-selection-block! block-dom-element :down)))
(when block-id
(if (empty? (state/get-selection-blocks))
(state/clear-selection!)
(state/set-selection-start-block! block-id)))
(when (contains? #{1 0} button)
(when-not forbidden-edit?