Browse Source

fix(ux): conflict shortcut for the shui popup

charlie 1 year ago
parent
commit
f99d9de888
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/main/frontend/handler/editor.cljs

+ 8 - 0
src/main/frontend/handler/editor.cljs

@@ -1768,6 +1768,13 @@
   (or @*asset-uploading?
       (state/get-editor-action)))
 
+(defn in-shui-popup?
+  []
+  (some-> js/document.activeElement
+    (.closest "[data-radix-menu-content]")
+    (nil?)
+    (not)))
+
 (defn get-current-input-char
   [input]
   (when-let [pos (cursor/pos input)]
@@ -3333,6 +3340,7 @@
 (defn shortcut-up-down [direction]
   (fn [e]
     (when (and (not (auto-complete?))
+               (not (in-shui-popup?))
                (not (slide-focused?))
                (not (state/get-timestamp-block)))
       (util/stop e)