Closed Bug 1760192 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 33178 - [inert] Set user-select:text on modal dialogs and fullscreen elements

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 33178 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/33178
Details from upstream follow.

Oriol Brufau <obrufau@igalia.com> wrote:

[inert] Set user-select:text on modal dialogs and fullscreen elements

Modal dialogs and fullscreen elements mark all elements outside of them
as inert. That makes them have a used value of "user-select: none".

But modal dialogs and fullscreen elements are not inert, so by default
they got "user-select: auto". This resolves to "none" since the used
value on the parent element is "none".

So modal dialogs and fullscreen elements were not selectable. This
patch addresses the problem by setting "user-select: text" on UA origin.

There is a somewhat similar precedent where the CSSWG resolved to set
"visibility: visible" on modal dialogs:
https://github.com/w3c/csswg-drafts/issues/6939#issuecomment-1016657928

Bug: 1305797

TEST=external/wpt/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection.html

Change-Id: I6fb00c25559dfefcf931be535ddf4128864c71ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3521788
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Oriol Brufau \<obrufau@igalia.com>
Cr-Commit-Position: refs/heads/main@{#981078}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f047f53e065
[wpt PR 33178] - [inert] Set user-select:text on modal dialogs and fullscreen elements, a=testonly
https://hg.mozilla.org/integration/autoland/rev/41a93f89f40c
[wpt PR 33178] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ee690542453
[wpt PR 33178] - [inert] Set user-select:text on modal dialogs and fullscreen elements, a=testonly
https://hg.mozilla.org/integration/autoland/rev/a3c69a76f4d3
[wpt PR 33178] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.