Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix intermediate float invalid state not accepting input

Sultan29a7cf9e76a1
diff --git a/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsx b/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsx
index ce034ab76c..eb3e902504 100644
--- a/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsx
+++ b/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsx
@@ -58,6 +58,7 @@ const useHandleOnChange = (
// We want to switch to unit mode if entire input is a number.
if (isNumericString(input)) {
+ if (value.type === "unit" && String(Number(input)) !== input) return;
onChange?.({
type: "unit",
// Use previously known unit or fallback to px.