diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 7c94071861..a2f0abd175 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -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) diff --git a/src/main/frontend/modules/shortcut/core.cljs b/src/main/frontend/modules/shortcut/core.cljs index 5329034239..883b68ed78 100644 --- a/src/main/frontend/modules/shortcut/core.cljs +++ b/src/main/frontend/modules/shortcut/core.cljs @@ -135,6 +135,7 @@ (let [id (keyword (.-identifier e)) shortcut-map (dh/shortcut-map handler-id state) ;; required to get shortcut map dynamically dispatch-fn (get shortcut-map id)] + (state/set-state! :editor/latest-shortcut id) ;; trigger fn (when dispatch-fn (plugin-handler/hook-lifecycle-fn! id dispatch-fn e)))) diff --git a/src/main/frontend/state.cljs b/src/main/frontend/state.cljs index 878f5749bf..4771321d9f 100644 --- a/src/main/frontend/state.cljs +++ b/src/main/frontend/state.cljs @@ -147,6 +147,7 @@ :editor/record-status "NONE" :editor/code-block-context {} + :editor/latest-shortcut (atom nil) :db/properties-changed-pages {} :history/paused? (atom false)