fix: don't trigger property shortcuts when editing

This commit is contained in:
Tienson Qin
2024-06-17 16:54:43 +08:00
parent 500245fb95
commit ee6abdc78a

View File

@@ -895,7 +895,8 @@
(not (util/input? (.-target e)))
(not (seq @jump-handler/*jump-data))
(not= (shui-dialog/get-last-modal-id) :property-dialog)
(not @(:editor/latest-shortcut @state/state)))
(not @(:editor/latest-shortcut @state/state))
(not (state/editing?)))
(let [shift? (.-shiftKey e)
shortcut (if shift? (str "shift+" (.-key e)) (.-key e))]
(db-property-handler/set-property-by-shortcut! shortcut)))