From 7106c6106d2a78801d4b2fa1aab589322caed7af Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Tue, 15 Mar 2022 06:18:37 -0700 Subject: [PATCH] [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 Commit-Queue: Oriol Brufau Cr-Commit-Position: refs/heads/main@{#981078} --- .../modal-dialog-selection.html | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection.html diff --git a/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection.html b/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection.html new file mode 100644 index 00000000000000..ab8dc4fd9842aa --- /dev/null +++ b/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection.html @@ -0,0 +1,50 @@ + + +Content selection in modal dialog + + + + + + + +123456789A + + + + + + +