focus-layers
focus-layers copied to clipboard
Fix alt-tab focusing
Repro:
- Run examples
- Open dialog, focus the text input
- Alt tab browser / change window focus
- Return window focus
Expected:
- Text input remains focused after returning
Actual:
- Some button is focused instead
I'm not sure if this would have negative side effects but it appears to resolve the issue. relatedTarget
is null on window defocus events, but the activeElement
appears to still be set to the expected element.