Skip to content

Commit

Permalink
Set user-select: none on the media-app sandboxed <iframe>.
Browse files Browse the repository at this point in the history
If there are clicks in the window before the <iframe> loads, it's
possible for the <iframe> itself to become selected. This puts a gray
overlay over the window contents which is impossible to remove without
reloading.

Fixed: b/227678322
Change-Id: I2886963bf11f0f5f869dd5eb8929a97af180425b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565218
Reviewed-by: Zain Afzal <zafzal@google.com>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988370}
  • Loading branch information
tapted authored and Chromium LUCI CQ committed Apr 4, 2022
1 parent e9642d4 commit aea1380
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ash/webui/media_app_ui/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
/* Any changes to this file should also be copied to index_dark_light.html. */

/*
* This is the <iframe> style set for sandboxed guests that use
* guest_view_iframe_container.js.
* TODO(crbug/996088): Remove the iframe styles if switched to <webview>.
* This is the <iframe> style set for sandboxed chrome-untrusted:// guests.
* `user-select: none` is applied here to avoid the iframe obtaining a grey
* overlay if it is clicked while loading (b/227678322).
*/
iframe {
border: 0;
height: 100%;
user-select: none;
width: 100%;
}
</style>
Expand Down

0 comments on commit aea1380

Please sign in to comment.