dojo / dojo/widgets

Radio button doesn't visually focus when tabbed to.

Open
#1,772 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
92
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**Bug**

Radio widget does not apply the "focused" class when focused.

**Code**

```


...
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.