From 9bcfb9783d17bb856cd148db02037fe8f7fc408d Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Mon, 23 May 2022 12:53:16 +0800 Subject: [PATCH] enhance: polish based on Zhiyuan's suggestion --- src/main/frontend/components/sidebar.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/components/sidebar.cljs b/src/main/frontend/components/sidebar.cljs index 770404964a..fc7d4c7e9c 100644 --- a/src/main/frontend/components/sidebar.cljs +++ b/src/main/frontend/components/sidebar.cljs @@ -458,8 +458,8 @@ (defn- hide-context-menu-and-clear-selection [e] (state/hide-custom-context-menu!) - (when (and (not (gobj/get e "shiftKey")) - (not (util/meta-key? e))) + (when-not (or (gobj/get e "shiftKey") + (util/meta-key? e)) (editor-handler/clear-selection!))) (rum/defcs ^:large-vars/cleanup-todo sidebar <