[dialog] CloseWatcher support?
Author: oliviertassinariCreated Jan 30, 2026Updated Sep 20, 2026
Labelscomponent: dialogdiscussionmobile
Summary
Native <dialog> supports this API. Maybe we should, too. See https://developer.mozilla.org/en-US/docs/Web/API/CloseWatcher.
Examples in other libraries
Motivation
Make it so that the state of the UI can be more easily navigated too.
There is a big UX problem with this, though: https://github.com/mui/base-ui/pull/3680#issuecomment-3826167764. I find it interesting to have an issue so other people can find it, but otherwise, as a user, I would personally prefer that this didn't exist because I don't trust it will ever get adopted by enough websites I use daily. (So only valuable for Android apps that are webviews, a niche market)
Source: mui/base-ui