[inert] Set user-select:text on modal dialogs and fullscreen elements #33178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
w3c/csswg-drafts#6939 (comment)
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 <[email protected]>
Commit-Queue: Oriol Brufau <[email protected]>
Cr-Commit-Position: refs/heads/main@{#981078}