fix: can't use property shortcuts on pages

This commit is contained in:
Tienson Qin
2024-05-28 02:24:09 +08:00
parent 84aa358420
commit 2b41fd1654

View File

@@ -896,11 +896,11 @@
(state/close-modal!)
(hide-context-menu-and-clear-selection e))
(and (seq (state/get-selection-block-ids))
(not (or (.-ctrlKey e) (.-metaKey e) (.-altKey e)))
(not (util/input? (.-target e)))
(not (seq @jump-handler/*jump-data))
(not= (shui-dialog/get-last-modal-id) :property-dialog))
(and
(not (or (.-ctrlKey e) (.-metaKey e) (.-altKey e)))
(not (util/input? (.-target e)))
(not (seq @jump-handler/*jump-data))
(not= (shui-dialog/get-last-modal-id) :property-dialog))
(let [shift? (.-shiftKey e)
shortcut (if shift? (str "shift+" (.-key e)) (.-key e))]
(db-property-handler/set-property-by-shortcut! shortcut)))))))