-
Notifications
You must be signed in to change notification settings - Fork 194
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
What should "nested" dialog light dismiss look like? #1128
Comments
Yes, it's important that clicking on inner should not close any lower dialogs. It should leave
Right. Only one dialog should close at a time. Closing many may be an unpredictable behaviour, and would sow distrust for the user as to what they can anticipate.
We have some nested dialogs where In the above image, there is actually a more complex case: the |
This is very helpful - thanks.
Thanks also for this use case. I believe this should be easy to implement, within the currently proposed behavior (whatwg/html#9373), by adding a listener for the outer dialog's |
Yes absolutely. No concerns on that particular behaviour. |
Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1391794}
Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1391794}
Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1391794}
So I updated Chrome's behavior to match what's roughly being proposed in the conversation above, namely that clicking outside a "stack" of dialogs only "pops" the first one off the stack. So for N dialogs, you'll need N clicks outside to close them all. The behavior for popovers meshes fairly well with this also, or at least that was my impression. So I've roughly come around to thinking this is likely the better/correct behavior. But if folks want to try it out live, grab Chrome Canary (minimum 133.0.6878.0) and give it a try! Please remember to add |
I definitely think this is the correct behavior. Sorry this is probably a bit obtuse, but in general a modal dialog is intended to / must be responded to in some way. I think it's common in these cases that a "parent" dialog spawns the "nested" one, and this often obscures the "parent." Responding to the "nested" dialog does not respond to the "parent," and as a user I expect to be able to get back to the "parent" and respond to it directly. Otherwise, I'm flummoxed with "where did that other dialog go?" |
The update definitely feels like the better behaviour. |
https://jsbin.com/pesomokilo/edit?html,output - The behaviour when you press escape here closing the back modal feels perhaps wrong to me (I could be convinced either way though)? Is this behaving as specced or is this expected to change? |
This is due to the current spec's CloseWatcher anti-abuse grouping. A more realistic example that has user activation does not exhibit the problem: https://jsbin.com/yefajififu/edit?html,output |
@domenic do you think the internals of |
I'm not clear on what you're envisioning. Circumventing anti-abuse grouping sounds like allowing abuse, which is bad? |
The anti-abuse mechanisms are multi-variant so it's not a linear path from anti-abuse to abuse though? I am suggesting that |
That trivially allows abuse: you then call The point of the anti-abuse mechanisms is to cap the number of back presses at (number of user activations) + 1, i.e. put the user in control. Capping it at (number of https://github.com/WICG/close-watcher?tab=readme-ov-file#abuse-analysis may be worth reviewing. |
Fwiw I'm fine with the odd behaviour given it only applies in these anti-abuse cases, and with the mix of closedby values. It feels edge case enough that it'll almost never come up (other than for us spec and implementor people who think about these cases) |
Pending @keithamus's agreement, it sounds like perhaps we've somewhat arrived at consensus? For me at least, with the new behavior, both this (@lukewarlow's example) and this (@domenic's example) feel "ok" to me. Both are somewhat odd situations, where the "outer" dialog is Assuming there are no other objections, I'm inclined to go back to the spec PR and say we now have the right behavior. So... any objections to that? |
This comment was marked as outdated.
This comment was marked as outdated.
(The above post is a bit confused. I will hide it. This is a second attempt.) Although the above comments are talking about the behavior for close requests (Esc key / Android back button), there is a related issue which is whether the anti-abuse mechanisms should apply to light dismiss and Recall that the anti-abuse protections come in two parts:
(2) is only relevant for close requests, so that's fine. Most of the above discussions were talking about (2). But (1) is being applied to Should we consider bypassing (1) for those cases? To spec this I would probably add an optional requireHistoryActionActivation boolean to "request to close" and set it to true for close requests, and false for light dismiss and |
…close one at a time, a=testonly Automatic update from web-platform-tests Update dialog closedby behavior to only close one at a time Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1391794} -- wpt-commits: e96c4c3d5c6510202598f558ea520b80f9507b31 wpt-pr: 49528
Ohh this is a good point. I agree that there doesn't seem to be any abuse potential in either light dismiss (where the user isn't hitting a "close" button which might be trying to navigate back) or in the developer calling Any objections from developers here? I don't see why there would be objections, but just checking. Otherwise, I'll take a look at adding some way around the abuse protections in the dialog spec PR. @domenic, if you have specific suggestions for a good way to go about that, I'm all ears. My first thought is to just add a boolean parameter to |
|
@domenic somehow I totally missed this paragraph of your comment. Thanks for the specific suggestion - I just flipped the name and logic of my last commit to match. Note that I think we should handle the |
See the conversation here: openui/open-ui#1128 (comment) Previously, both dialog light dismiss and dialog.requestClose() would be subject to CloseWatcher's abuse prevention logic, which requires user activation. But that doesn't make sense, as pointed out in the thread above, since neither of those are "abusive" things - they're not keeping a user from navigating back. So this CL adds a parameter to CloseWatcher.requestClose() that allows callers to proceed with requesting close even if there isn't sufficient user activation. Note that this CL does not change the existing behavior for other CloseWatchers - those will still require user activation for now. See crbug.com/383593252 for that. Bug: 376516550,383593252 Change-Id: Ibf5ccc835794aba2aa627ddec7caafa6c9c26e55
See the conversation here: openui/open-ui#1128 (comment) Previously, both dialog light dismiss and dialog.requestClose() would be subject to CloseWatcher's abuse prevention logic, which requires user activation. But that doesn't make sense, as pointed out in the thread above, since neither of those are "abusive" things - they're not keeping a user from navigating back. So this CL adds a parameter to CloseWatcher.requestClose() that allows callers to proceed with requesting close even if there isn't sufficient user activation. Note that this CL does not change the existing behavior for other CloseWatchers - those will still require user activation for now. See crbug.com/383593252 for that. Bug: 376516550,383593252 Change-Id: Ibf5ccc835794aba2aa627ddec7caafa6c9c26e55 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6085724 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395143}
See the conversation here: openui/open-ui#1128 (comment) Previously, both dialog light dismiss and dialog.requestClose() would be subject to CloseWatcher's abuse prevention logic, which requires user activation. But that doesn't make sense, as pointed out in the thread above, since neither of those are "abusive" things - they're not keeping a user from navigating back. So this CL adds a parameter to CloseWatcher.requestClose() that allows callers to proceed with requesting close even if there isn't sufficient user activation. Note that this CL does not change the existing behavior for other CloseWatchers - those will still require user activation for now. See crbug.com/383593252 for that. Bug: 376516550,383593252 Change-Id: Ibf5ccc835794aba2aa627ddec7caafa6c9c26e55 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6085724 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395143}
I'm a little sad about introducing But, I trust you to fast-follow with such a change, if you would prefer to split them. |
Yeah that's fair, compat might not be that bad. Ok. I'll try to put them together and ship them both at the same time. 😄 |
The Open UI Community Group just discussed
The full IRC log of that discussion<hdv> masonf: this might be resolved… but want to make sure we're not missing anything<hdv> masonf: when I worked on light dismiss for dialogs, there came up the question what about multiple dialogs that are nested? <hdv> masonf: if you stack a bunch of dialogs and click outside of them, the top most one gets light dismissed, ther rest doesn't. So if you have three, you'd need to click 3 times for them all to go away <scott> q+ <hdv> masonf: for dialogs it seemed to make most sense to have that behaviour <hdv> masonf: does anyone feel this is funny in some way? <masonf> ack scott <hdv> scott: what you said makes sense to me… would the same thing happen with the Esc key ? <lwarlow> q+ <hdv> masonf: yes <hdv> masonf: yes* <hdv> masonf: *there are some corner cases <hdv> masonf: the new closeby attr allows you to chose between any close request, or none <hdv> masonf: there are some funny cases where closeby=any on the first dialog and then closeby=none on the third one on top, it feels funny. But then mixing and matching different closeby values in a stack of dialogs is funny anyway <hdv> scott: just wanted to make sure it works the same with clicking outside and escape <masonf> q? <masonf> ack warlow <masonf> ack lwarlow <hdv> masonf: this is why there are 3 closeby attr values… we wanted to explicitly make sure that @@@ <hdv> lwarlow: regarding Esc… if people back navigate on Android… from what I've seen it's not a common thing to come up <hdv> lwarlow: the only weird thing would be a weird mix of closeby values and dialogs vs popovers <hdv> lwarlow: if we find a weird edge case for thsi that we find after we ship it, it'd probably not be hard for us to fix it <hdv> masonf: yes seems to me too, as long as not many people have used it yet and there are no compat issues <masonf> q? <masonf> Proposed resolution: the latest spec PR behavior seems ok <lwarlow> +1 <hdv> lwarlow: it's odd it doesn't use the attribute change stacks <hdv> lwarlow: feels more complicated not to do that <hdv> lwarlow: but I get how we did it seems fair <hdv> lwarlow: with the open attribute it gets that anyway <hdv> masonf: the case where you remove the open attr and then don't call close; that is fixed with the PR this week, but if you'd do that it'd be funny anyway <hdv> masonf: so you're still ok with the behaviour? <hdv> lwarlow: yeah <masonf> RESOLVED: the latest spec PR behavior seems ok |
…close one at a time, a=testonly Automatic update from web-platform-tests Update dialog closedby behavior to only close one at a time Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1391794} -- wpt-commits: e96c4c3d5c6510202598f558ea520b80f9507b31 wpt-pr: 49528
…close one at a time, a=testonly Automatic update from web-platform-tests Update dialog closedby behavior to only close one at a time Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <dbaronchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Reviewed-by: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1391794} -- wpt-commits: e96c4c3d5c6510202598f558ea520b80f9507b31 wpt-pr: 49528 UltraBlame original commit: 4079bdd253f749bea402e22f1929ca53a25c228b
…close one at a time, a=testonly Automatic update from web-platform-tests Update dialog closedby behavior to only close one at a time Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <dbaronchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Reviewed-by: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1391794} -- wpt-commits: e96c4c3d5c6510202598f558ea520b80f9507b31 wpt-pr: 49528 UltraBlame original commit: 4079bdd253f749bea402e22f1929ca53a25c228b
…close one at a time, a=testonly Automatic update from web-platform-tests Update dialog closedby behavior to only close one at a time Per the discussions at: - openui/open-ui#1128 - whatwg/html#9373 (comment) both developer and editor feedback is that the prior behavior was a bit odd. In the case where there are "nested" dialogs, the desired behavior is for light dismiss clicks to just pop the topmost dialog off the stack, rather than trying to close all non-clicked dialogs. This CL implements that behavior and updates the test. After implementing this behavior and playing with it a bit, I agree with the feedback - this feels more like what users would expect. Once this lands and I get a bit of feedback, I'll incorporate this into the spec PR. Bug: 376516550 Change-Id: I4b5cfb7dd4a27fc304e52759d882b47394e55524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068807 Commit-Queue: David Baron <dbaronchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Reviewed-by: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1391794} -- wpt-commits: e96c4c3d5c6510202598f558ea520b80f9507b31 wpt-pr: 49528 UltraBlame original commit: 4079bdd253f749bea402e22f1929ca53a25c228b
I'm going to close this issue, since we discussed and resolved on the latest spec behavior. |
Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396007}
Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396007}
…uestClose not need UA, a=testonly Automatic update from web-platform-tests Make dialog light dismiss and dialog.requestClose not need UA See the conversation here: openui/open-ui#1128 (comment) Previously, both dialog light dismiss and dialog.requestClose() would be subject to CloseWatcher's abuse prevention logic, which requires user activation. But that doesn't make sense, as pointed out in the thread above, since neither of those are "abusive" things - they're not keeping a user from navigating back. So this CL adds a parameter to CloseWatcher.requestClose() that allows callers to proceed with requesting close even if there isn't sufficient user activation. Note that this CL does not change the existing behavior for other CloseWatchers - those will still require user activation for now. See crbug.com/383593252 for that. Bug: 376516550,383593252 Change-Id: Ibf5ccc835794aba2aa627ddec7caafa6c9c26e55 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6085724 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395143} -- wpt-commits: 1b5c4813b2d59d7f8e705687c3b8342c930f95fc wpt-pr: 49648
…uire user activation, a=testonly Automatic update from web-platform-tests Make closeWatcher.requestClose() not require user activation Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396007} -- wpt-commits: 36042af16ff7ebcbf7ed2b12401a10939d5842a0 wpt-pr: 49681
…uestClose not need UA, a=testonly Automatic update from web-platform-tests Make dialog light dismiss and dialog.requestClose not need UA See the conversation here: openui/open-ui#1128 (comment) Previously, both dialog light dismiss and dialog.requestClose() would be subject to CloseWatcher's abuse prevention logic, which requires user activation. But that doesn't make sense, as pointed out in the thread above, since neither of those are "abusive" things - they're not keeping a user from navigating back. So this CL adds a parameter to CloseWatcher.requestClose() that allows callers to proceed with requesting close even if there isn't sufficient user activation. Note that this CL does not change the existing behavior for other CloseWatchers - those will still require user activation for now. See crbug.com/383593252 for that. Bug: 376516550,383593252 Change-Id: Ibf5ccc835794aba2aa627ddec7caafa6c9c26e55 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6085724 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395143} -- wpt-commits: 1b5c4813b2d59d7f8e705687c3b8342c930f95fc wpt-pr: 49648
…uire user activation, a=testonly Automatic update from web-platform-tests Make closeWatcher.requestClose() not require user activation Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396007} -- wpt-commits: 36042af16ff7ebcbf7ed2b12401a10939d5842a0 wpt-pr: 49681
…uire user activation, a=testonly Automatic update from web-platform-tests Make closeWatcher.requestClose() not require user activation Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <masonfchromium.org> Reviewed-by: David Baron <dbaronchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1396007} -- wpt-commits: 36042af16ff7ebcbf7ed2b12401a10939d5842a0 wpt-pr: 49681 UltraBlame original commit: c689e198a6664efd81b4283aa8a7f19430c37c07
…uire user activation, a=testonly Automatic update from web-platform-tests Make closeWatcher.requestClose() not require user activation Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <masonfchromium.org> Reviewed-by: David Baron <dbaronchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1396007} -- wpt-commits: 36042af16ff7ebcbf7ed2b12401a10939d5842a0 wpt-pr: 49681 UltraBlame original commit: c689e198a6664efd81b4283aa8a7f19430c37c07
…uire user activation, a=testonly Automatic update from web-platform-tests Make closeWatcher.requestClose() not require user activation Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <masonfchromium.org> Reviewed-by: David Baron <dbaronchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1396007} -- wpt-commits: 36042af16ff7ebcbf7ed2b12401a10939d5842a0 wpt-pr: 49681 UltraBlame original commit: c689e198a6664efd81b4283aa8a7f19430c37c07
…uire user activation, a=testonly Automatic update from web-platform-tests Make closeWatcher.requestClose() not require user activation Per the conversation here: openui/open-ui#1128 (comment) There's a desire to ship closeWatcher.requestClose() along with dialog.requestclose() both not requiring user activation. The spec PR has been updated accordingly: whatwg/html#10737 (in this commit: whatwg/html@76619aa) Fixed: 383593252 Change-Id: I8c05e352d8b4964407a1cee36f35372e192e2ca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092173 Auto-Submit: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396007} -- wpt-commits: 36042af16ff7ebcbf7ed2b12401a10939d5842a0 wpt-pr: 49681
I have a spec PR open to add dialog "light dismiss" capabilities, via a new
closedby
attribute, here: whatwg/html#9373. One question came up (see discussion starting roughly here) about what the behavior should be for "nested" dialogs. I keep putting quotes around "nested" because dialogs don't have any current notion of being "nested", in the same way that popovers explicitly do (see the bigNote
here: https://html.spec.whatwg.org/#topmost-popover-ancestor). So any behavior we add here is essentially inventing some concept of nested dialogs.So the question is, what are typical expectations for users or developers when multiple modal dialogs are open, and the user clicks outside one of them. I'd like to side-step the question of modeless dialogs, at least for now, since I consider modals the more pressing, and common, use case.
Here's a demo to work with (borrowed and tweaked from @domenic):
Some things to note:
showModal
calls.::backdrop
covering the area outside the dialog.inner
is actually a click oninner
's::backdrop
. It is impossible to click onouter
or its::backdrop
.There are three positions that a user might try to click (labeled in red in the demo above):
inner
's border box.outer
's border box.Note, again, that #2 and #3 are both actually clicks on the backdrop of
inner
.In terms of potential outcomes, for each click position:
inner
should always leaveinner
visible. It could either closeouter
or leave it open. It seems like it makes the most sense to leaveouter
open, at least to a user for this use case.inner
, soinner
should clearly close. And because it's an attempted click onouter
, it seems likeouter
should stay open.inner
should close, since it is topmost. The question is whether the user expects this click to just closeinner
and leaveouter
open (i.e. just pop one dialog off the stack), or whether both should close. My assumption is that in all design systems today that implement "light dismiss dialogs",outer
stays open, just due to implementation. But I'd love confirmation.The point of this issue is a) to make sure I haven't missed something, and b) to check expectations for behavior. I'd love to discuss, so Agenda+.
The text was updated successfully, but these errors were encountered: