Sfoglia il codice sorgente

fix: clear block selection when clicking property value

Tienson Qin 4 mesi fa
parent
commit
1c947ef229
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/main/frontend/components/property/value.cljs

+ 3 - 1
src/main/frontend/components/property/value.cljs

@@ -1523,7 +1523,9 @@
              value-cp [:div.property-value-inner
              value-cp [:div.property-value-inner
                        {:data-type type
                        {:data-type type
                         :class (str (when empty-value? "empty-value")
                         :class (str (when empty-value? "empty-value")
-                                    (when-not (:other-position? opts) " w-full"))}
+                                    (when-not (:other-position? opts) " w-full"))
+                        :on-pointer-down (fn [_]
+                                           (state/clear-selection!))}
                        (cond
                        (cond
                          (and multiple-values? (contains? #{:default :url} type) (not closed-values?) (not editing?))
                          (and multiple-values? (contains? #{:default :url} type) (not closed-values?) (not editing?))
                          (property-normal-block-value block property v opts)
                          (property-normal-block-value block property v opts)