From b5c454648d2cc3292c23818ccbc652fdf5b7e3b9 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Thu, 17 Dec 2020 20:50:44 +0800 Subject: [PATCH] fix(editor): clear highlighted selection when blocks are selected --- src/main/frontend/handler/editor.cljs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 89edb2bc8e..c2d83d0bce 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -1128,11 +1128,7 @@ (doseq [block (state/get-selection-blocks)] (dom/remove-class! block "selected") (dom/remove-class! block "noselect")) - (state/clear-selection!)) - ;; (when e - ;; (when-not (util/input? (gobj/get e "target")) - ;; (util/clear-selection!))) -) + (state/clear-selection!))) (defn clear-selection-blocks! [] @@ -1332,7 +1328,9 @@ :else nil) - (state/conj-selection-block! element up?))))))) + (do + (util/clear-selection!) + (state/conj-selection-block! element up?)))))))) (defn save-block-aux! [block value format]