-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Describe the bug
When using shouldFocusDOMNode initial focus works as expected. If for some reason actual focus is lost. This happens if a button element is set to disabled while fetching data or a mouse click in another area of the DOM via LG Magic Remote, then focus remains on the button from useFocusable but the underlying DOM node has lost focus.
To Reproduce
Steps to reproduce the behavior:
- Set new INIT with
shouldFocusDOMNodetrue. - Create a focusable element with
useFocusablewith a button - Programatically set button element to
disabled: trueand then back todisabled: false - The focus still appears to be on the correct Button but no
onEnterPressmethods will fire.
Expected behavior
Expect visual focus and focused property from useFocusable to reflect actual state.
I assume this is not trivial to do, as the DOM focus is not tracked as part of the library.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels