From 7b1f0eaaf0a000f43bcc1909e3623ad73ec31a9a Mon Sep 17 00:00:00 2001 From: Xaviju Date: Thu, 7 May 2026 12:34:37 +0200 Subject: [PATCH] :recycle: Revert ESC keypress closes plugins (#9267) --- .../src/app/main/data/workspace/shortcuts.cljs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/frontend/src/app/main/data/workspace/shortcuts.cljs b/frontend/src/app/main/data/workspace/shortcuts.cljs index e7ff9a99ed..c25c712681 100644 --- a/frontend/src/app/main/data/workspace/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/shortcuts.cljs @@ -6,12 +6,10 @@ (ns app.main.data.workspace.shortcuts (:require - [app.common.data.macros :as dm] [app.main.data.common :as dcm] [app.main.data.event :as ev] [app.main.data.exports.assets :as de] [app.main.data.modal :as modal] - [app.main.data.plugins :as dpl] [app.main.data.preview :as dp] [app.main.data.profile :as du] [app.main.data.shortcuts :as ds] @@ -32,7 +30,6 @@ [app.main.store :as st] [app.main.ui.hooks.resize :as r] [app.util.dom :as dom] - [beicon.v2.core :as rx] [potok.v2.core :as ptk])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -51,17 +48,6 @@ (when (and can-edit? (not read-only?)) (run! st/emit! events)))) -(def esc-pressed - (ptk/reify ::esc-pressed - ptk/WatchEvent - (watch [_ state _] - (rx/of - :interrupt - (let [selection (dm/get-in state [:workspace-local :selected])] - (if (empty? selection) - (dpl/close-current-plugin) - (dw/deselect-all true))))))) - ;; Shortcuts format https://github.com/ccampbell/mousetrap (def base-shortcuts @@ -149,7 +135,7 @@ :escape {:tooltip (ds/esc) :command "escape" :subsections [:edit] - :fn #(st/emit! esc-pressed)} + :fn #(st/emit! :interrupt (dw/deselect-all true))} :find {:tooltip (ds/meta "F") :command (ds/c-mod "f") :subsections [:edit] :fn #(st/emit! (dw/open-layers-search :find))}