-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
Bug
Radio widget does not apply the "focused" class when focused.
Code
<div
key="root"
classes={[
theme.variant(),
themeCss.root,
checked ? themeCss.checked : null,
disabled ? themeCss.disabled : null,
focus.isFocused('root') ? themeCss.focused : null,
valid === false ? themeCss.invalid : null,
valid === true ? themeCss.valid : null,
readOnly ? themeCss.readonly : null,
required ? themeCss.required : null
]}
>
...
<input
id={idBase}
{...formatAriaProperties(aria)}
classes={themeCss.input}
checked={checked}
disabled={disabled}
focus={focus.shouldFocus()}
aria-invalid={valid === false ? 'true' : undefined}
name={name}
readonly={readOnly}
aria-readonly={readOnly === true ? 'true' : undefined}
required={required}
type="radio"
value={value}
onblur={() => onBlur && onBlur()}
onchange={(event: Event) => {
event.stopPropagation();
const radio = event.target as HTMLInputElement;
onValue(radio.checked);
}}
onfocus={() => onFocus && onFocus()}
onpointerenter={() => onOver && onOver()}
onpointerleave={() => onOut && onOut()}
/>
Expected behavior:
focus.isFocused('root') is true and applies the class
Actual behavior:
focus.isFocused('root') is always false because it is, indeed, the input that gets the focus.
Metadata
Metadata
Assignees
Labels
No labels