From e6b605e8e5c365955ef70bbd69a0aa0c45a03a17 Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Mon, 9 Oct 2023 14:08:53 -0400 Subject: [PATCH] fix: only confirm property deletion for class schema properties Deleting any normal block/page property shouldn't require double clicking --- src/main/frontend/components/property.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/components/property.cljs b/src/main/frontend/components/property.cljs index 8032bd900..c912c546a 100644 --- a/src/main/frontend/components/property.cljs +++ b/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!