google / google/material-design-lite

click outside mdl-dialog to dismiss

Open
#5,030 13 comments 3 reactions 0 assignees View on GitHub
Dialog enhancement
Dominant language
HTML
Stars
32.2k
Forks
4.9k
PR merge metrics
No merged PRs in 30d

Description

The "Dismissing dialogs" section of [the material design dialog spec](https://material.io/guidelines/components/dialogs.html#dialogs-behavior) says:

> Dialogs can be dismissed by touching/clicking outside of a dialog

It might be worth adding support for this to mdl-dialog, such as by adding a special CSS class. The mdl javascript could automatically add a click handler that dismisses any currently-visible mdl-dialog with this class when it detects that the user has clicked outside the dialog.

> What MDL Version are you using? (please be specific, e.g. _major.minor.patch_)

1.3.0

Thanks for your consideration and for the great work on mdl!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.