fix: property shortcut not works always

This commit is contained in:
Tienson Qin
2024-06-24 14:34:59 +08:00
parent 4b26956d10
commit 998b991172

View File

@@ -900,7 +900,9 @@
(let [shift? (.-shiftKey e)
shortcut (if shift? (str "shift+" (.-key e)) (.-key e))]
(db-property-handler/set-property-by-shortcut! shortcut)))
(state/set-ui-last-key-code! (.-key e))
(state/set-ui-last-key-code! (.-key e))))
(mixins/listen state js/window "keyup"
(fn [_e]
(state/set-state! :editor/latest-shortcut nil)))))
[state route-match main-content]
(let [{:keys [open-fn]} state