Browse Source

fix: clear block selection when clicking property value

Tienson Qin 4 months ago
parent
commit
1c947ef229
1 changed files with 3 additions and 1 deletions
  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
                        {:data-type type
                         :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
                          (and multiple-values? (contains? #{:default :url} type) (not closed-values?) (not editing?))
                          (property-normal-block-value block property v opts)