Browse Source

fix: don't clear selection when clicking property value in popup

Tienson Qin 4 months ago
parent
commit
b399275034
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/main/frontend/components/property/value.cljs

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

@@ -1525,8 +1525,9 @@
                        {:data-type type
                         :class (str (when empty-value? "empty-value")
                                     (when-not (:other-position? opts) " w-full"))
-                        :on-pointer-down (fn [_]
-                                           (state/clear-selection!))}
+                        :on-pointer-down (fn [e]
+                                           (when-not (some-> (.-target e) (.closest "[data-radix-popper-content-wrapper]"))
+                                             (state/clear-selection!)))}
                        (cond
                          (and multiple-values? (contains? #{:default :url} type) (not closed-values?) (not editing?))
                          (property-normal-block-value block property v opts)