Browse Source

fix: don't popup property config when cmd+click the property title

Tienson Qin 6 months ago
parent
commit
6fec5f1c17
2 changed files with 14 additions and 15 deletions
  1. 0 2
      deps/db/src/logseq/db/common/view.cljs
  2. 14 13
      src/main/frontend/components/property.cljs

+ 0 - 2
deps/db/src/logseq/db/common/view.cljs

@@ -133,8 +133,6 @@
         minor-sorting (seq (rest sorting))
         major-sorted-entities
         (sort-by-single-property db major-sorting entities (not-empty minor-sorting))]
-    (prn :debug :count (count entities)
-         :sorted (count major-sorted-entities))
     (if minor-sorting
       (sort-entities-by-minor-sorting db major-sorted-entities minor-sorting)
       major-sorted-entities)))

+ 14 - 13
src/main/frontend/components/property.cljs

@@ -261,19 +261,20 @@
                          (route-handler/redirect-to-page! (:block/uuid property))
                          (.preventDefault e)))
     :on-click (fn [^js/MouseEvent e]
-                (shui/popup-show! (.-target e)
-                                  (fn []
-                                    (property-config/property-dropdown property block {:debug? (.-altKey e)
-                                                                                       :class-schema? class-schema?}))
-                                  {:content-props
-                                   {:class "ls-property-dropdown as-root"
-                                    :onEscapeKeyDown (fn [e]
-                                                       (util/stop e)
-                                                       (shui/popup-hide!)
-                                                       (when-let [input (state/get-input)]
-                                                         (.focus input)))}
-                                   :align "start"
-                                   :as-dropdown? true}))}
+                (when-not (util/meta-key? e)
+                  (shui/popup-show! (.-target e)
+                                    (fn []
+                                      (property-config/property-dropdown property block {:debug? (.-altKey e)
+                                                                                         :class-schema? class-schema?}))
+                                    {:content-props
+                                     {:class "ls-property-dropdown as-root"
+                                      :onEscapeKeyDown (fn [e]
+                                                         (util/stop e)
+                                                         (shui/popup-hide!)
+                                                         (when-let [input (state/get-input)]
+                                                           (.focus input)))}
+                                     :align "start"
+                                     :as-dropdown? true})))}
 
    (:block/title property)))