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.

autofocus last empty prop field after adding

Oleg Isonen3ca1f27c6417
diff --git a/apps/designer/app/designer/features/props-panel/props-panel.tsx b/apps/designer/app/designer/features/props-panel/props-panel.tsx
index cbc29e8c58..41becbd218 100644
--- a/apps/designer/app/designer/features/props-panel/props-panel.tsx
+++ b/apps/designer/app/designer/features/props-panel/props-panel.tsx
@@ -46,6 +46,7 @@ const Property = ({
placeholder="Property"
name="prop"
value={prop}
+ autoFocus={prop === ""}
onChange={(event) => {
onChange(id, "prop", event.target.value);
}}
@@ -53,7 +54,7 @@ const Property = ({
{isInvalidProp ? (
<Tooltip content={`Invalid property name: ${prop}`}>
<ExclamationTriangleIcon width={12} height={12} />
- </Tooltip>
+ </Tooltip>
) : (
<Control
type={type}