-
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
Consider throwing for showModal() and showPopover() in non-fully-active documents #10659
Comments
Sounds reasonable to me (non-implementer, userland consumer). They already throw for a handful of exceptional cases (calling |
Given how new popover is, how most uses of popover are probably based on user input, and how niche this type of document is, my instinct is also that this would be web compatible. Likewise for dialogs, they're relatively new too. Should this apply to dialog.show() too? |
I'm unsure about |
Throwing sounds good to me. |
Is the idea here that nothing should be in the top layer when a document is no longer fully active? Will we also empty it when a document becomes inactive? |
No, I think the idea is that nothing should be in the top layer for synthetic documents. "Normal" documents that get bfcached can have a top layer without an issue, IMO. |
Wouldn't a browsing context check be more appropriate then? I guess either way could work, but the former is a more exact match of what you're after. |
Indeed, they're equivalent in this case. Fully active is just more conventional. |
Well, doesn't a bfcache'd document still hold onto its browsing context? |
Yes, but you cannot call |
This sounds reasonable, and likely to be web compatible, at least to me. It seems very corner-case to create a document, put a popover in it, and call I'd be relatively happy to take the risk of compat shipping this change, if there's consensus. |
Thanks all. I think that's explicit support from 2/3 implementations and some level of implicit agreement from @annevk, so I'll take this off of agenda+ and proceed with a spec PR asynchronously. |
Closes #10659. This effectively only impacts dialogs and popovers "synthetic" documents, such as those created via document.implementation.createHTMLDocument().
Closes whatwg#10634. See whatwg#10659 for a better followup.
See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4
See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenic@chromium.org> Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/main@{#1375681}
See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenic@chromium.org> Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/main@{#1375681}
…non-active documents, a=testonly Automatic update from web-platform-tests Throw exception for popovers/dialogs in non-active documents See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenic@chromium.org> Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/main@{#1375681} -- wpt-commits: 0b99ee5e8c799f9fbf7d1550ef72fec8bdb45760 wpt-pr: 48854
…non-active documents, a=testonly Automatic update from web-platform-tests Throw exception for popovers/dialogs in non-active documents See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenicchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Commit-Queue: Domenic Denicola <domenicchromium.org> Cr-Commit-Position: refs/heads/main{#1375681} -- wpt-commits: 0b99ee5e8c799f9fbf7d1550ef72fec8bdb45760 wpt-pr: 48854 UltraBlame original commit: ac6cc55b745eb0d675d453266bde353b7d335402
…non-active documents, a=testonly Automatic update from web-platform-tests Throw exception for popovers/dialogs in non-active documents See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenicchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Commit-Queue: Domenic Denicola <domenicchromium.org> Cr-Commit-Position: refs/heads/main{#1375681} -- wpt-commits: 0b99ee5e8c799f9fbf7d1550ef72fec8bdb45760 wpt-pr: 48854 UltraBlame original commit: ac6cc55b745eb0d675d453266bde353b7d335402
…non-active documents, a=testonly Automatic update from web-platform-tests Throw exception for popovers/dialogs in non-active documents See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenicchromium.org> Auto-Submit: Mason Freed <masonfchromium.org> Commit-Queue: Domenic Denicola <domenicchromium.org> Cr-Commit-Position: refs/heads/main{#1375681} -- wpt-commits: 0b99ee5e8c799f9fbf7d1550ef72fec8bdb45760 wpt-pr: 48854 UltraBlame original commit: ac6cc55b745eb0d675d453266bde353b7d335402
…non-active documents, a=testonly Automatic update from web-platform-tests Throw exception for popovers/dialogs in non-active documents See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenic@chromium.org> Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/main@{#1375681} -- wpt-commits: 0b99ee5e8c799f9fbf7d1550ef72fec8bdb45760 wpt-pr: 48854
…non-active documents, a=testonly Automatic update from web-platform-tests Throw exception for popovers/dialogs in non-active documents See discussion at: whatwg/html#10659 and spec PR at: whatwg/html#10705 Web-facing change PSA: https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ Fixed: 373684393 Change-Id: I50e400ee526775f915f006865301fff2f04016b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740 Reviewed-by: Domenic Denicola <domenic@chromium.org> Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/main@{#1375681} -- wpt-commits: 0b99ee5e8c799f9fbf7d1550ef72fec8bdb45760 wpt-pr: 48854
Closes whatwg#10659. This effectively only impacts dialogs and popovers "synthetic" documents, such as those created via document.implementation.createHTMLDocument().
What is the issue with the HTML Standard?
As a followup to #10634, it doesn't really make sense that you can call
showModal()
orshowPopover()
on elements which are inside of synthetic documents, of the type created bydocument.implementation.createHTMLDocument()
. Example: https://jsbin.com/cubafoputo/1/edit?html,js,outputI think we should have these throw exceptions, similar to the exceptions we already throw for disconnected elements.
I suspect this change is web-compatible, especially for popover but even for dialog. These synthetic documents are super rare.
@smaug---- @keithamus @josepharhar @nt1m do you agree? Are you willing to take the potential compat risk or the trouble of adding use counters?
The text was updated successfully, but these errors were encountered: