fix: some shortcuts not working on Chrome

pull/11293/head
Tienson Qin 2024-04-17 18:57:27 +08:00
parent 640f0c76e6
commit a02f94e5c1
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@
(f e)
;; return false to prevent default browser behavior
;; and stop event from bubbling
(.preventDefault e)
false))
(defn enable-when-not-editing-mode!
@ -18,6 +19,7 @@
(when-not (or (state/editing?)
(util/input? (.-target e)))
(f e)
(.preventDefault e)
false)))
(defn enable-when-editing-mode!

View File

@ -353,7 +353,7 @@
:editor/select-parent {:binding "mod+a"
:fn editor-handler/select-parent}
:editor/zoom-in {:binding (if mac? "mod+." "alt+right")
:editor/zoom-in {:binding (if mac? ["mod+." "mod+shift+."] "alt+right") ; FIXME: mod+. not works on Chrome
:fn editor-handler/zoom-in!}
:editor/zoom-out {:binding (if mac? "mod+," "alt+left")