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: Fix local token clickable area (#4922)

Oleg Isonen47e15ab01fee
diff --git a/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx b/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx
index bd5c0aec9f..c81226b8b0 100644
--- a/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx
+++ b/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx
@@ -318,20 +318,13 @@ export const StyleSourceControl = ({
disabled={disabled}
aria-current={selected && state === undefined}
role="button"
+ onClick={onSelect}
hasError={error !== undefined}
>
- <Flex
- grow
- css={{
- position: "relative",
- paddingBlock: theme.spacing[3],
- paddingInline: theme.spacing[4],
- }}
- >
+ <Flex grow css={{ padding: theme.spacing[2] }}>
<StyleSourceButton
disabled={disabled || isEditing}
isEditing={isEditing}
- onClick={onSelect}
tabIndex={-1}
>
<Flex align="center" justify="center" gap="1">
diff --git a/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx b/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx
index 1c2de9ac62..71131db8bc 100644
--- a/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx
+++ b/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx
@@ -204,28 +204,26 @@ const TextFieldBase: ForwardRefRenderFunction<
onKeyDown={onKeyDown}
>
{/* We want input to be the first element in DOM so it receives the focus first */}
- {editingItemId === undefined && (
- <InputField
- {...textFieldProps}
- variant="chromeless"
- css={{
- fontVariantNumeric: "tabular-nums",
- lineHeight: 1,
- order: 1,
- flex: 1,
- "&:focus-within, &:hover": {
- borderColor: "transparent",
- },
- }}
- size="1"
- value={label}
- onClick={onClick}
- ref={inputRef}
- inputRef={internalInputRef}
- spellCheck={false}
- aria-label="New Style Source Input"
- />
- )}
+ <InputField
+ {...textFieldProps}
+ variant="chromeless"
+ css={{
+ fontVariantNumeric: "tabular-nums",
+ lineHeight: 1,
+ order: 1,
+ flex: 1,
+ "&:focus-within, &:hover": {
+ borderColor: "transparent",
+ },
+ }}
+ size="1"
+ value={label}
+ onClick={onClick}
+ ref={inputRef}
+ inputRef={internalInputRef}
+ spellCheck={false}
+ aria-label="New Style Source Input"
+ />
{value.map((item) => (
<StyleSourceControl
key={item.id}