-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ToggleEvent
s to <dialog>.showModal()
#9733
Comments
How about via |
During the WHATWG Triage Session at TPAC today, WHATWG has resolved that |
Small correction: beforetoggle should be non-cancelable during close as well. (This matches popover.) |
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605
keith made a PR to implement this here: #10091 |
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605
The Am I correct to assume that a |
Is there any difference between |
Yes,
|
@rejhgadellaa Thanks for your reply. I didn't find any difference in the descriptions below:
|
The difference will be that There will be a limitation that |
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238172 Commit-Queue: Joey Arhar <[email protected]> Reviewed-by: Keith Cirkel <[email protected]> Cr-Commit-Position: refs/heads/main@{#1360795}
This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238172 Commit-Queue: Joey Arhar <[email protected]> Reviewed-by: Keith Cirkel <[email protected]> Cr-Commit-Position: refs/heads/main@{#1360795}
…nts, a=testonly Automatic update from web-platform-tests Implement toggle events for dialog elements This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238172 Commit-Queue: Joey Arhar <[email protected]> Reviewed-by: Keith Cirkel <[email protected]> Cr-Commit-Position: refs/heads/main@{#1360795} -- wpt-commits: 30fc634d561c33720c78570e8b85a5360fa2faf6 wpt-pr: 44208
…nts, a=testonly Automatic update from web-platform-tests Implement toggle events for dialog elements This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238172 Commit-Queue: Joey Arhar <[email protected]> Reviewed-by: Keith Cirkel <[email protected]> Cr-Commit-Position: refs/heads/main@{#1360795} -- wpt-commits: 30fc634d561c33720c78570e8b85a5360fa2faf6 wpt-pr: 44208
…nts, a=testonly Automatic update from web-platform-tests Implement toggle events for dialog elements This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238172 Commit-Queue: Joey Arhar <[email protected]> Reviewed-by: Keith Cirkel <[email protected]> Cr-Commit-Position: refs/heads/main@{#1360795} -- wpt-commits: 30fc634d561c33720c78570e8b85a5360fa2faf6 wpt-pr: 44208
…nts, a=testonly Automatic update from web-platform-tests Implement toggle events for dialog elements This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238172 Commit-Queue: Joey Arhar <jarharchromium.org> Reviewed-by: Keith Cirkel <chromiumkeithcirkel.co.uk> Cr-Commit-Position: refs/heads/main{#1360795} -- wpt-commits: 30fc634d561c33720c78570e8b85a5360fa2faf6 wpt-pr: 44208 UltraBlame original commit: 0dc7b4fdaa7a8c8cabf38840e81de595c2b39e04
…nts, a=testonly Automatic update from web-platform-tests Implement toggle events for dialog elements This patch implements beforetoggle and toggle events for dialog elements. See spec issue: whatwg/html#9733 Bug: 1521813 Change-Id: I56e38230663990c8f1ed8ecd9307a6a881372605 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238172 Commit-Queue: Joey Arhar <jarharchromium.org> Reviewed-by: Keith Cirkel <chromiumkeithcirkel.co.uk> Cr-Commit-Position: refs/heads/main{#1360795} -- wpt-commits: 30fc634d561c33720c78570e8b85a5360fa2faf6 wpt-pr: 44208 UltraBlame original commit: 0dc7b4fdaa7a8c8cabf38840e81de595c2b39e04
It is useful for web authors do determine when their
<dialog>
elements open and close.popover
already hasToggleEvent
which is dispatched when apopover
opens or closes, but<dialog>
does not. The current way to detect when a<dialog>
opens is to register a mutation observer to check foropen
, however, this is quite a lot of work where an event would be easier.I propose we add dispatching of
ToggleEvent
for<dialog>
also. To be explicit: whenshowModal
is called,<dialog>
should dispatch aToggleEvent
withnewState=open
. When a dialog is closed (via form or button or close signal) it should dispatch aToggleEvent
withnewState=closed
.Spec PR
The text was updated successfully, but these errors were encountered: