Contact emails [email protected]
Explainer No information provided Specification No information provided Summary Fire a focusreset event on the document when the focus was reset due to an element being removed. This will eventually replace firing `blur` on removal, which is currently a chromium-only behavior. Blink component Blink>HTML>Focus Web Feature ID Missing feature Motivation Because Gecko/WebKit doesn't fire blur on removal, multiple libraries have to use setInterval or mutation observers to track focus resets. A few examples: Redactyl: https://github.com/tridactyl/tridactyl/blob/f49e1c94bcd481fdc86fb219335bafc4ce0f25ab/src/content.ts#L180-L187 Radix: https://github.com/radix-ui/primitives/blob/main/packages/react/focus-scope/src/focus-scope.tsx#L122-L165 Focus Trap: https://github.com/focus-trap/focus-trap/blob/master/index.js#L981-L1035 Material UI: https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Unstable_TrapFocus/FocusTrap.tsx#L360-L377 The pattern is to use setInterval or a MutationObserver as a way to circumvent the missing event. FIring a focusreset for the missing event would make this inefficient/hacky workaround unnecessary and we can perhaps finally be interoperable about this. Initial public proposal https://github.com/whatwg/html/issues/12842 Goals for experimentation None Requires code in //chrome? False Tracking bug https://g-issues.chromium.org/issues/572677865 Estimated milestones No milestones specified Link to entry on the Chrome Platform Status https://chromestatus.com/feature/5068521917775872?gate=5185767814070272 This intent message was generated by Chrome Platform Status. -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6accb094.6e0b2b3a.151e33.0ce3.GAE%40google.com.
