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.

experimental: Fix inset reset (onAbort is called on blur) (#5105)

Ivan Starkov9cc131adaf41
diff --git a/apps/builder/app/builder/features/settings-panel/props-section/animation/animation-section.tsx b/apps/builder/app/builder/features/settings-panel/props-section/animation/animation-section.tsx
index 7f2c32e722..f52e0700e2 100644
--- a/apps/builder/app/builder/features/settings-panel/props-section/animation/animation-section.tsx
+++ b/apps/builder/app/builder/features/settings-panel/props-section/animation/animation-section.tsx
@@ -389,6 +389,11 @@ export const AnimationSection = ({
id={fieldIds.insetStart}
value={value.insetStart ?? { type: "keyword", value: "auto" }}
onChange={(insetStart, isEphemeral) => {
+ if (insetStart === undefined) {
+ handleChange(undefined, isEphemeral);
+ return;
+ }
+
handleChange({ ...value, insetStart }, isEphemeral);
}}
/>
@@ -396,6 +401,11 @@ export const AnimationSection = ({
id={fieldIds.insetEnd}
value={value.insetEnd ?? { type: "keyword", value: "auto" }}
onChange={(insetEnd, isEphemeral) => {
+ if (insetEnd === undefined) {
+ handleChange(undefined, isEphemeral);
+ return;
+ }
+
handleChange({ ...value, insetEnd }, isEphemeral);
}}
/>