w3c / html

Deliverables of the HTML Working Group until October 2018
https://w3c.github.io/html/
Other
1.95k stars 527 forks source link

dialog element - closing when clicking outside #1667

Closed o-t-w closed 4 years ago

o-t-w commented 5 years ago

It is overwhelmingly common question on Stack Overflow. Its something that is often not implemented well (see The Dangers of Stopping Event Propogation) This popular blog post documents one far from perfect method of closing the <dialog> by clicking outside. Could we please get an easy way to do this?

OmidHekayati commented 5 years ago

As it proposed in #860 I also think <dialog> must have a modal bool attribute <dialog modal> for these reasons:

siusin commented 4 years ago

Thanks @o-t-w and @OmidHekayati .

We're closing this issue on the W3C HTML specification because the W3C and WHATWG are now working together on HTML, and all issues are being discussed on the WHATWG repository.

If you filed this issue and you still think it is relevant, please open a new issue on the WHATWG repository and reference this issue (if there is useful information here). Before you open a new issue, please check for existing issues on the WHATWG repository to avoid duplication.

If you have questions about this, please open an issue on the W3C HTML WG repository or send an email to public-html@w3.org.