Ver código fonte

fix: ignore input when use properties with shortcuts

Tienson Qin 1 ano atrás
pai
commit
a232e11107
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      src/main/frontend/components/container.cljs

+ 2 - 1
src/main/frontend/components/container.cljs

@@ -896,7 +896,8 @@
                           (hide-context-menu-and-clear-selection e))
                           (hide-context-menu-and-clear-selection e))
 
 
                         (and (seq (state/get-selection-block-ids))
                         (and (seq (state/get-selection-block-ids))
-                             (not (or (.-ctrlKey e) (.-metaKey e) (.-altKey e))))
+                             (not (or (.-ctrlKey e) (.-metaKey e) (.-altKey e)))
+                             (not (util/input? (.-target e))))
                         (let [shift? (.-shiftKey e)
                         (let [shift? (.-shiftKey e)
                               shortcut (if shift? (str "shift+" (.-key e)) (.-key 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)))))))