From 7de95e108b2afb96a077b3703b43e533097ad795 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Mon, 10 Nov 2025 11:28:00 +0100 Subject: [PATCH] :bug: Fix crash when using decimal values for X/Y or width/height (#7722) --- CHANGES.md | 1 + .../main/ui/workspace/sidebar/options/menus/measures.cljs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a9919a543e..09bf8935bf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -78,6 +78,7 @@ - Fix focus mode persisting across page/file navigation [Taiga #12469](https://tree.taiga.io/project/penpot/issue/12469) - Fix shadow color validation [Github #7705](https://github.com/penpot/penpot/pull/7705) - Fix exception on selection blend-mode using keyboard [Github #7710](https://github.com/penpot/penpot/pull/7710) +- Fix crash when using decimal (floating-point) values for X/Y or width/height [Taiga #12543](https://tree.taiga.io/project/penpot/issue/12543) ## 2.10.1 diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs index 040bb3eb29..be32415efe 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs @@ -303,7 +303,7 @@ (mf/use-fn (mf/deps ids) (fn [value attr] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (do (st/emit! (udw/trigger-bounding-box-cloaking ids)) (binding [cts/*wasm-sync* true] @@ -334,7 +334,7 @@ (mf/use-fn (mf/deps ids) (fn [value attr] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (do (st/emit! (udw/trigger-bounding-box-cloaking ids)) (binding [cts/*wasm-sync* true] @@ -359,7 +359,7 @@ (mf/use-fn (mf/deps ids) (fn [value] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (do (st/emit! (udw/trigger-bounding-box-cloaking ids)) (binding [cts/*wasm-sync* true]