-
Notifications
You must be signed in to change notification settings - Fork 193
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
[popup] Consider to add popupshowing, popupshown, popuphiding and popuphidden events #342
Comments
This was discussed in this week's meeting with the following resolution:
|
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label. |
The pop-up API has evolved significantly since this question was raised. In particular, the |
I'm inclined to close this issue, given that I believe (subject to being told I'm wrong!) that the current proposal functionality covers all relevant use cases. |
Re-opening to let @smaug---- comment with some use cases. |
From a meeting notes:
I think some variant of popupshown is pretty critical, especially because of the focus handling. |
This use case could just as easily be done in the "beforetoggle" event, right? I.e. this is some variant of
For focusing elements, we have the
I guess this is an argument that either can work?
This last bit is related more to anchor positioning, I think. Doesn't the ResizeObserver or IntersectionObserver take care of this use case though?
We have discussed this question several times, not just in this issue, but also in #607 (comment), and more when I proposed it as a more general WHATWG issue. There haven't been compelling developer-driven arguments that there's a use case for the "after" events. Or at least none have emerged thus far in all of the testing and demos for Popover. Let's discuss further - I've added this to the agenda for a future meeting (will be next year). |
The Open UI Community Group just discussed The full IRC log of that discussion<una> masonf: Ollie from Mozilla requested this be reopen<una> masonf: issue is why don't we have one event before and one after, but I'd like to get Ollie to be able to present this, so would be happy to wait <dbaron> s/Ollie/Olli/ <una> Action: will check if this is a time Olli (smaug----) can make before further discussion |
@smaug---- We were curious if you'd be able to make a future OpenUI meeting to present/discuss this. They're currently Thursdays at 14:00 New York / 11:00 Los Angeles, which (except during the weird summer time weeks) is I think 21:00 Helsinki. |
Sure, 21:00 should be fine. |
Great! @gregwhitworth can we please make sure this issue gets back on the agenda for this week Thursday so @smaug---- can participate? |
The Open UI Community Group just discussed
The full IRC log of that discussion<gregwhitworth> Topic: [popup] Consider to add popupshowing, popupshown, popuphiding and popuphidden events<gregwhitworth> github: https://github.com//issues/342 <gregwhitworth> masonf: this is an issue we briefly discussed last week since smaug asked to re-open it <gregwhitworth> masonf: it's misnamed a bit; we have beforetoggle; it's more of a request for aftertoggle of the hide or show <gregwhitworth> masonf: we've talked on 342 and 607 and WHATWG 8386 and in all of those cases we all agreed that there was no usecase that needs no after <gregwhitworth> smaug: it's really only about the one event popupafter <gregwhitworth> smaug: it's pretty important, the current API has auto focus, but what then <gregwhitworth> smaug: what do you do if you want to focus somewhere else later <gregwhitworth> smaug: you'll need to switch to another API since autofocus no longer works at this phase of the event <gregwhitworth> smaug: that's my main point here <sarah_higley> q+ <gregwhitworth> masonf: the auto focus manages it correctly but other scenarios after it is shown they'll use .focus elsewhere <gregwhitworth> masonf: the event would be after the popup is shown the focus is moved. Mozilla Firefox actually uses this paradigm <gregwhitworth> ack sarah_higley <gregwhitworth> sarah_higley: I was going to add some usecases that are similar to what smaug said <gregwhitworth> sarah_higley: when the popup is shown you want to conditionally focus something <gregwhitworth> sarah_higley: also the hidden event would allow you to do this for when the page is no longer inert <gregwhitworth> sarah_higley: this makes more sense for dialog but for symetry it makes sense <masonf> Proposed resolution: Add an asynchronous `aftertoggle` event, which also uses the same ToggleEvent that `beforetoggle` uses. <masonf> ...and which runs after the popover is fully shown or hidden. <masonf> RESOLVED: Add an asynchronous `aftertoggle` event, which also uses the same ToggleEvent that `beforetoggle` uses, and which runs after the popover is fully shown or hidden. |
This CL adds an async `aftertoggle` event to both the show and hide popover transitions, and renames the event class from BeforeToggle to PopoverToggle, to be used by both events. This was resolved by OpenUI here: openui/open-ui#342 (comment) Bug: 1307772 Change-Id: I996be74b90f43eee4bf859cecfed051fa6f633d5
This CL adds an async `aftertoggle` event to both the show and hide popover transitions, and renames the event class from BeforeToggle to PopoverToggle, to be used by both events. This was resolved by OpenUI here: openui/open-ui#342 (comment) Bug: 1307772 Change-Id: I996be74b90f43eee4bf859cecfed051fa6f633d5
Side note: we just decided in the HTML spec triage meeting to rename |
This CL adds an async `aftertoggle` event to both the show and hide popover transitions, and renames the event class from BeforeToggle to PopoverToggle, to be used by both events. This was resolved by OpenUI here: openui/open-ui#342 (comment) Bug: 1307772 Change-Id: I996be74b90f43eee4bf859cecfed051fa6f633d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4160443 Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1092158}
This CL adds an async `aftertoggle` event to both the show and hide popover transitions, and renames the event class from BeforeToggle to PopoverToggle, to be used by both events. This was resolved by OpenUI here: openui/open-ui#342 (comment) Bug: 1307772 Change-Id: I996be74b90f43eee4bf859cecfed051fa6f633d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4160443 Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1092158}
Side note: such decisions are non-binding: https://whatwg.org/working-mode#meetings. |
This CL adds an async `aftertoggle` event to both the show and hide popover transitions, and renames the event class from BeforeToggle to PopoverToggle, to be used by both events. This was resolved by OpenUI here: openui/open-ui#342 (comment) Bug: 1307772 Change-Id: I996be74b90f43eee4bf859cecfed051fa6f633d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4160443 Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1092158}
…estonly Automatic update from web-platform-tests Add `aftertoggle` event for popover This CL adds an async `aftertoggle` event to both the show and hide popover transitions, and renames the event class from BeforeToggle to PopoverToggle, to be used by both events. This was resolved by OpenUI here: openui/open-ui#342 (comment) Bug: 1307772 Change-Id: I996be74b90f43eee4bf859cecfed051fa6f633d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4160443 Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1092158} -- wpt-commits: e3246afc19a62a2d4f26786e6eae72a601a2c032 wpt-pr: 37915
…estonly Automatic update from web-platform-tests Add `aftertoggle` event for popover This CL adds an async `aftertoggle` event to both the show and hide popover transitions, and renames the event class from BeforeToggle to PopoverToggle, to be used by both events. This was resolved by OpenUI here: openui/open-ui#342 (comment) Bug: 1307772 Change-Id: I996be74b90f43eee4bf859cecfed051fa6f633d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4160443 Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Commit-Queue: Mason Freed <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1092158} -- wpt-commits: e3246afc19a62a2d4f26786e6eae72a601a2c032 wpt-pr: 37915
The proposed popup elements shares lots of common with XUL popup element (which is used in Firefox UI to create all sorts of popups). Very common way to use a popup is to fill its content just when it is about to be shown. That is why there is popupshowing DOM event. Other commonly used events are popupshown, popuphiding and popuphidden.
(There is also popuppositioned event.)
The text was updated successfully, but these errors were encountered: