-
Notifications
You must be signed in to change notification settings - Fork 191
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] Add ::backdrop to popup #519
Comments
Agree with this idea. Not all popups may need this, but it would be good if developers easily had the ability to add a |
The Open UI Community Group just discussed The full IRC log of that discussion<gregwhitworth> Topic: Add ::backdrop to popup to enable modal popup<gregwhitworth> github: https://github.com//issues/519 <flackr> una: The idea is we may need a backdrop attribute for popup - e.g. menus that slide in from top. This proposal is to add a ::backdrop as an optional pseudo you can style similar to a modal dialog but for popups <masonf> q+ <flackr> una: there's plenty of examples in which you have a popup and a page style that separates the popup from the rest of the page content <flackr> una: do we need a different property to make it appear? I don't think so, because popup is always on top <gregwhitworth> q+ <gregwhitworth> ack masonf <flackr> masonf: I like the idea. My only objection is to the naming "modal" popup. The backdrop element would still trigger a light dismiss as the popup isn't modal <flackr> una: Agree, I'll update the issue <flackr> una: Another issue is should you be able to make modal dialogs?? from popup? <JonathanNeal> q+ <flackr> gregwhitworth: my understanding is the pseudo always exists but you could optionally style <flackr> una: Yes <gregwhitworth> ack gregwhitworth <flackr> gregwhitworth: do we need to do this for every popup type element or can we generalize this? I.e. any top layer element has a ::backdrop pseudo? <flackr> una: The question becomes is the rest of the page inert? <flackr> gregwhitworth: no, this would be visual only, and the behavior would be based on the given element's behavior <gregwhitworth> ack JonathanNeal <flackr> JonathanNeal: If we had this pseudo, would this help resolve issue #415 where we handle a focusout <flackr> masonf: I don't think so, because we're not making the rest of the page inert so you still should be able to tab out <hdv> q+ <flackr> una: there are cases where i would want the rest of the page to be inert while the popup is open but maybe this is just adding some javascript <flackr> masonf: it might be worthwhile to open an issue for this <gregwhitworth> ack hdv <flackr> hdv: why is the modal part separate from the backdrop? From an accessibility point of view a backdrop feels like it should block other elements <gregwhitworth> q+ <flackr> hdv: maybe there's a use case i'm missing where this is important <flackr> una: my understanding is you lose the ability to light dismiss with click when you have inert <flackr> masonf: we can define it however we like. if we have a backdrop and it is opaque, the concern is that you might be able to move focus, but if you do that light dismiss will happen <emilio> q+ <flackr> masonf: this is #415 where we resolved that moving out of the popup (focus, click, etc) will dismiss the popup <flackr> gregwhitworth: since it's not an element, and just an attribute, why do we need the pseudo when anyone can apply their own div that takes up the whole space? <flackr> masonf: it gets hard to do light dismiss, if your popup fills the viewport you block light dismiss <flackr> emilio: you could make it not in the popup <JonathanNeal> +1 to add backdrop pseudo element, fwiw :) <flackr> emilio: if you style it with pointer-events: none it would allow clicking through it to the content behind <gregwhitworth> q? <flackr> una: you could do this on the page anyways . .?? <JonathanNeal> I think a background is a common affordance for modal/popup-like things. <flackr> una: a common use case is a menu with a three dot thing and you want to make the rest of the page visually behind <JonathanNeal> s/background/backdrop <flackr> gregwhitworth: my thinking is whether all of these pseudo solutions are simplistic and don't handle more complicated cases <gregwhitworth> ack gregwhitworth <gregwhitworth> ack emilio <una> q+ <flackr> emilio: I don't know if we need a pseudo if you can make the :after escape the popup, but i don't think there's any reason we can't have :backdrop if we want <gregwhitworth> Zakim, close the queue <Zakim> ok, gregwhitworth, the speaker queue is closed <flackr> emilio: no strong opinions. I guess we do this for fullscreen as well. I don't think having or not having it limits the use cases much <flackr> una: I'm against relying on :after or :before because devs use this for things like arrows or other elements, and backdrop is what we use to apply exactly what we're trying to do here <JonathanNeal> I will use the queue to express support in the call <JonathanNeal> q+ <JonathanNeal> nvm <JonathanNeal> :) <flackr> una: to gregwhitworth's points, i don't think you need multiple elements for the common use case <masonf> Proposed resolution: add a ::backdrop pseudo element behind popups. <JonathanNeal> +1 to adding a backdrop pseudo element <JonathanNeal> +1 <flackr> +1 <flackr> Resolved: add a ::backdrop pseudo element behind popups. <JonathanNeal> yay! <gregwhitworth> Zakim, end meeting <Zakim> As of this point the attendees have been gregwhitworth, masonf, JonathanNeal, emilio, dandclark, miriam, davatron, dbaron, una, hdv, NaN, tantek, flackr <Zakim> RRSAgent, please draft minutes <RRSAgent> I have made the request to generate https://www.w3.org/2022/04/21-openui-minutes.html Zakim <Zakim> I am happy to have been of service, gregwhitworth; please remember to excuse RRSAgent. Goodbye |
Note the resolution from the notes above:
|
@una Per the discussion, would you mind opening a fresh issue, if you'd still like, to discuss whether there should be a modal popup capability? I'd like to close this issue as resolved. |
The ::backdrop element was always there, but this CL makes it fixed position, full-viewport, so it can be styled/visible. Tests are also added for stacking and appearance. See: openui/open-ui#519 Bug: 1307772 Change-Id: I2527aef33f89b140950d92302a7aefac0b6efc03
The ::backdrop element was always there, but this CL makes it fixed position, full-viewport, so it can be styled/visible. Tests are also added for stacking and appearance. See: openui/open-ui#519 Bug: 1307772 Change-Id: I2527aef33f89b140950d92302a7aefac0b6efc03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3621791 Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#999070}
The ::backdrop element was always there, but this CL makes it fixed position, full-viewport, so it can be styled/visible. Tests are also added for stacking and appearance. See: openui/open-ui#519 Bug: 1307772 Change-Id: I2527aef33f89b140950d92302a7aefac0b6efc03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3621791 Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#999070}
The ::backdrop element was always there, but this CL makes it fixed position, full-viewport, so it can be styled/visible. Tests are also added for stacking and appearance. See: openui/open-ui#519 Bug: 1307772 Change-Id: I2527aef33f89b140950d92302a7aefac0b6efc03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3621791 Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#999070}
…t for popup, a=testonly Automatic update from web-platform-tests Add stylability to the ::backdrop element for popup The ::backdrop element was always there, but this CL makes it fixed position, full-viewport, so it can be styled/visible. Tests are also added for stacking and appearance. See: openui/open-ui#519 Bug: 1307772 Change-Id: I2527aef33f89b140950d92302a7aefac0b6efc03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3621791 Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#999070} -- wpt-commits: d5bb637fdb24638b7aa8beb020e949eaec548e07 wpt-pr: 33919
…t for popup, a=testonly Automatic update from web-platform-tests Add stylability to the ::backdrop element for popup The ::backdrop element was always there, but this CL makes it fixed position, full-viewport, so it can be styled/visible. Tests are also added for stacking and appearance. See: openui/open-ui#519 Bug: 1307772 Change-Id: I2527aef33f89b140950d92302a7aefac0b6efc03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3621791 Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#999070} -- wpt-commits: d5bb637fdb24638b7aa8beb020e949eaec548e07 wpt-pr: 33919
The ::backdrop element was always there, but this CL makes it fixed position, full-viewport, so it can be styled/visible. Tests are also added for stacking and appearance. See: openui/open-ui#519 Bug: 1307772 Change-Id: I2527aef33f89b140950d92302a7aefac0b6efc03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3621791 Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#999070} NOKEYCHECK=True GitOrigin-RevId: 9627a68ba52db27da4e91e3100a0391f78aa14d7
Request to add
::backdrop
pseudo-element topopup
elements to enable modal behavior for popups.Two quick examples:
popup
features)Similar to the
dialog
element, this may possibly require a specific way to open the popup as a modal (or not, sincepopup
is always in top layer, and the presence of the::backdrop
would be enough).The text was updated successfully, but these errors were encountered: