From f07495ae955d53de07b1025a029dfaf4608cf262 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 21 Jan 2026 09:36:14 +0100 Subject: [PATCH] :bug: Fix incorrect handling of numeric values layout padding and gap Fixes https://github.com/penpot/penpot/issues/8113 --- CHANGES.md | 2 ++ .../workspace/sidebar/options/menus/layout_container.cljs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c3b176e71e..b175d03cfb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -35,6 +35,8 @@ - Remove whitespaces from asset export filename [Github #8133](https://github.com/penpot/penpot/pull/8133) - Fix exception on uploading large fonts [Github #8135](https://github.com/penpot/penpot/pull/8135) - Fix unhandled exception on open-new-window helper [Github #7787](https://github.com/penpot/penpot/issues/7787) +- Fix incorrect handling of input values on layout gap and padding inputs [Github #8113](https://github.com/penpot/penpot/issues/8113) + ## 2.12.1 diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs index 320abd7d18..e89033964d 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs @@ -375,7 +375,7 @@ (mf/use-fn (mf/deps on-change ids) (fn [value attr event] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (on-change :simple attr value event) (do (let [resolved-value (:resolved-value (first value)) @@ -489,7 +489,7 @@ (mf/use-fn (mf/deps on-change ids) (fn [value attr event] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (on-change :multiple attr value event) (do (let [resolved-value (:resolved-value (first value))] @@ -724,7 +724,7 @@ (mf/use-fn (mf/deps on-change wrap-type ids) (fn [value event attr] - (if (or (string? value) (int? value)) + (if (or (string? value) (number? value)) (on-change (= "nowrap" wrap-type) attr value event) (do (let [resolved-value (:resolved-value (first value))]