material-web
material-web copied to clipboard
Fully support CloseWatcher and anti-abuse non-cancelable dialog closes
Description
See https://github.com/material-components/material-web/issues/5313 and https://bugs.chromium.org/p/chromium/issues/detail?id=1512224 for context.
The new CloseWatcher api introduces anti-abuse patterns where a dialog may be closed without a cancel event. Our dialog manually handles closing and does not catch this situation (Android back button or pressing Escape twice).
We should remove the Chrome 120 patch logic in dialog and add CloseWatcher support.