Răsfoiți Sursa

fix: only confirm property deletion for class schema properties

Deleting any normal block/page property shouldn't require double
clicking
Gabriel Horner 2 ani în urmă
părinte
comite
e6b605e8e5
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      src/main/frontend/components/property.cljs

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

@@ -424,7 +424,9 @@
       (when-not hide-delete?
         [:a.fade-link {:on-click (fn [e]
                                    (util/stop e)
-                                   (when (js/confirm "Are you sure you want to delete this property?")
+                                   (when (or (not (and class? class-schema?))
+                                             ;; Only ask for confirmation on class schema properties
+                                             (js/confirm "Are you sure you want to delete this property?"))
                                      (let [repo (state/get-current-repo)
                                            f (if (and class? class-schema?)
                                                property-handler/class-remove-property!