microsoft / tabster

Web Application Keyboard Navigation Tools
https://tabster.io
MIT License
118 stars 36 forks source link

Restorer relies on focusout event firing when element is removed #305

Closed smhigley closed 11 months ago

smhigley commented 12 months ago

Safari does not fire focusout or any other events when a node is removed, which means focus isn't restored when the restorer source is unmounted, even though focus returns to the body.

This can be reproduced in the Restorer stories in Safari, and also in FUI in components with popups (e.g. Popover, Dialog, Menu, etc.).

smhigley commented 12 months ago

Actually jumped the gun a little here -- the current focusout approach doesn't work in any non-Chromium browser, and the spec is unclear/currently debated as to which approach is correct.

ref: