From 82e3a5fa53ee2a241c29ac8e7799a896103405c0 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 10 Mar 2026 12:33:02 +0000 Subject: [PATCH] :bug: Fix 'not ISeqable' error when entering float values in layout/opacity inputs Replace int? with number? in on-change handlers for layout item margins, min/max sizes, and layer opacity. Using int? caused float values like 8.5 to fall into the design token branch, calling (first 8.5) and crashing. Signed-off-by: Andrey Antukh --- CHANGES.md | 1 + .../app/main/ui/workspace/sidebar/options/menus/layer.cljs | 2 +- .../ui/workspace/sidebar/options/menus/layout_item.cljs | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f223538233..d4fae89f5e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -37,6 +37,7 @@ - Fix component "broken" after variant switch [Taiga #12984](https://tree.taiga.io/project/penpot/issue/12984) - Fix incorrect query for file versions [Github #8463](https://github.com/penpot/penpot/pull/8463) - Fix warning when clicking on number token pills [Taiga #13661](https://tree.taiga.io/project/penpot/issue/13661) +- Fix 'not ISeqable' error when entering float values in layout item and opacity inputs [Github #8569](https://github.com/penpot/penpot/pull/8569) ## 2.13.3 diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs index f0b549dcac..3e5cfe9921 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layer.cljs @@ -140,7 +140,7 @@ (mf/use-fn (mf/deps on-change handle-opacity-change) (fn [value] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (handle-opacity-change value) (do (st/emit! (dwta/toggle-token {:token (first value) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs index dd6c661030..ca3e53ee1a 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs @@ -117,7 +117,7 @@ (mf/use-fn (mf/deps on-change ids) (fn [value attr] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (on-change :simple attr value) (do (st/emit! @@ -247,7 +247,7 @@ (mf/use-fn (mf/deps on-change ids) (fn [value attr] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (on-change :multiple attr value) (do (st/emit! @@ -577,7 +577,7 @@ (mf/use-fn (mf/deps ids) (fn [value attr] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (st/emit! (dwsl/update-layout-child ids {attr value})) (do (st/emit!