material-components / material-components/material-web

Fully support CloseWatcher and anti-abuse non-cancelable dialog closes

Open
#5,330 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
11.3k
Forks
1.1k
Avg merge
20h 28m
Merged PRs (30d)
13

Description

### 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](https://github.com/WICG/close-watcher) 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dialog implementation and read the linked CloseWatcher and Chromium issue for the anti-abuse behavior. Remove the Chrome 120 patch logic and add CloseWatcher support so Android back and repeated Escape closes are handled without relying on a cancel event.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.