Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Support method="dialog" dismissal #71

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

seanpdoyle
Copy link
Contributor

@seanpdoyle seanpdoyle commented Sep 15, 2021

The <dialog> element specifications support dismissing an open element
by submitting a <form method="dialog"> or by submitting a <form>
with a <button formmethod="dialog"> element.

This commit adds support for either of those methods as an alternative
to a <button type="button" data-dialog-close> element.

@seanpdoyle seanpdoyle requested a review from a team as a code owner September 15, 2021 01:55
Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good change to me, with one minor suggestion.

src/index.ts Outdated Show resolved Hide resolved
The `<dialog>` element specifications support dismissing an open element
by submitting a `<form method="dialog">` or by submitting a `<form>`
with a `<button formmethod="dialog">` element.

This commit adds support for either of those methods as an alternative
to a `<button type="button" data-dialog-close>` element.

[method="dialog"]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#usage_notes
README.md Show resolved Hide resolved
Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me 👍 😄

@keithamus keithamus merged commit 6357225 into github:main Feb 15, 2022
@seanpdoyle seanpdoyle deleted the method-dialog-dismiss branch May 11, 2022 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants