focus-layers icon indicating copy to clipboard operation
focus-layers copied to clipboard

Fix alt-tab focusing

Open fozzle opened this issue 2 years ago • 0 comments

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.

fozzle avatar Jul 15 '22 00:07 fozzle