mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
fix: enable property shortcut only if a block has been selected
This commit is contained in:
@@ -894,9 +894,9 @@
|
||||
(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 @(:editor/latest-shortcut @state/state))
|
||||
(not (state/editing?)))
|
||||
(not (state/editing?))
|
||||
(seq (state/get-selection-blocks)))
|
||||
(let [shift? (.-shiftKey e)
|
||||
shortcut (if shift? (str "shift+" (.-key e)) (.-key e))]
|
||||
(db-property-handler/set-property-by-shortcut! shortcut)))
|
||||
|
||||
Reference in New Issue
Block a user