fix: don't show property dialog if matched with other shortcuts

This commit is contained in:
Tienson Qin
2024-05-28 05:21:30 +08:00
parent fbdb22358a
commit ee114af41c
3 changed files with 6 additions and 2 deletions

View File

@@ -900,10 +900,12 @@
(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))
(not= (shui-dialog/get-last-modal-id) :property-dialog)
(not @(:editor/latest-shortcut @state/state)))
(let [shift? (.-shiftKey e)
shortcut (if shift? (str "shift+" (.-key e)) (.-key e))]
(db-property-handler/set-property-by-shortcut! shortcut)))))))
(db-property-handler/set-property-by-shortcut! shortcut)))
(state/set-state! :editor/latest-shortcut nil)))))
[state route-match main-content]
(let [{:keys [open-fn]} state
current-repo (state/sub :git/current-repo)