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
shouldFocusDOMNode true.
- Create a focusable element with
useFocusable with a button
- Programatically set button element to
disabled: true and then back to disabled: false
- The focus still appears to be on the correct Button but no
onEnterPress methods 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.
Describe the bug
When using
shouldFocusDOMNodeinitial focus works as expected. If for some reason actual focus is lost. This happens if abuttonelement 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 fromuseFocusablebut the underlying DOM node has lostfocus.To Reproduce
Steps to reproduce the behavior:
shouldFocusDOMNodetrue.useFocusablewith a buttondisabled: trueand then back todisabled: falseonEnterPressmethods will fire.Expected behavior
Expect visual focus and
focusedproperty fromuseFocusableto 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.