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 hover icon style, keyboard events

Sultanc914f27eeb08
diff --git a/apps/designer/app/designer/features/style-panel/controls/text/text-control.tsx b/apps/designer/app/designer/features/style-panel/controls/text/text-control.tsx
index caab6abff9..a2d276197b 100644
--- a/apps/designer/app/designer/features/style-panel/controls/text/text-control.tsx
+++ b/apps/designer/app/designer/features/style-panel/controls/text/text-control.tsx
@@ -88,7 +88,9 @@ export const TextControl = ({
...CSSIconButton,
...(isCurrentBreakpoint && {
bc: "$colors$blue4",
- color: "$colors$blue11",
+ "&:not(:hover)": {
+ color: "$colors$blue11",
+ },
}),
}}
>
@@ -103,11 +105,11 @@ export const TextControl = ({
setValue(event.target.value)
}
onFocus={(event: FocusEvent<HTMLInputElement>) => event.target.select()}
- onKeyUp={(event: KeyboardEvent<HTMLInputElement>) => {
+ onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {
if (value.type !== "unit") return;
+ event.preventDefault();
if (event.code === "ArrowUp") setValue(String(value.value + 1));
if (event.code === "ArrowDown") setValue(String(value.value - 1));
- event.preventDefault();
}}
/>
{value.type === "unit" ? (