From 1e70ed0ae5cd8745abbe52cbb48f85d9d2809467 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Tue, 10 Sep 2024 00:30:18 +0800 Subject: [PATCH] fix: clearing the search box for setting node icons deletes nodes fixes https://github.com/logseq/db-test/issues/62 --- src/main/frontend/handler/editor.cljs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 7be2dbc3f3..437073c74c 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -3118,13 +3118,15 @@ (defn shortcut-cut-selection [e] - (util/stop e) - (cut-blocks-and-clear-selections! true)) + (when-not (util/input? (.-target e)) + (util/stop e) + (cut-blocks-and-clear-selections! true))) (defn shortcut-delete-selection [e] - (util/stop e) - (cut-blocks-and-clear-selections! false)) + (when-not (util/input? (.-target e)) + (util/stop e) + (cut-blocks-and-clear-selections! false))) (defn- copy-current-block-ref [format]