-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Implement toggleevents for dialog open/close #23332
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
Implement toggleevents for dialog open/close #23332
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Is this is in the spec somewhere? |
ef08e8f to
706583c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Not yet but we discussed it as TPAC and it was deemed a reasonable addition. Tentative spec PR here: whatwg/html#10091 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the close event should be emitted before toggle, to get consistent event ordering (otherwise toggle might fire first when no coalescing is happening, but after when it isn't)
706583c to
9fcacba
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
The spec PR has been merged. |
nt1m
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure tests are passing before landing
9fcacba to
fa02c68
Compare
This comment was marked as outdated.
This comment was marked as outdated.
fa02c68 to
9c17339
Compare
|
EWS run on current version of this PR (hash 9c17339) |
|
Safe-Merge-Queue: Build #47598. |
https://bugs.webkit.org/show_bug.cgi?id=268160 Reviewed by Tim Nguyen. This adds the `beforetoggle` cancelable event to `show()`/`showModal()` calls. If `beforetoggle` isn't cancelled, it will show the dialog and dispatch a `toggle` event. Likewise, the close method adds a NON cancelable `beforetoggle` and `toggle` event. These events can help developers when prepping a dialog to be shown or hidden, such as doing page calculations or kicking off animations. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/toggle-events.tentative-expected.txt: * Source/WebCore/html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::show): (WebCore::HTMLDialogElement::showModal): (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::queueDialogToggleEventTask): * Source/WebCore/html/HTMLDialogElement.h: Canonical link: https://commits.webkit.org/289695@main
9c17339 to
bd7649e
Compare
|
Committed 289695@main (bd7649e): https://commits.webkit.org/289695@main Reviewed commits have been landed. Closing PR #23332 and removing active labels. |
bd7649e
9c17339