Page MenuHomePhabricator

Video adds black background to page that is not removed when video closes
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open an article with a video, e.g. enwiki:Video
  • Make the browser window narrow enough, and/or zoom in enough, that the video player will occupy the full screen rather than being modal-like
  • Play a video
  • Close the video player with the “close” button

What happens?:

The <body> has a black background applied. This is most visible when using old Vector (e.g. on German Wikipedia, where it’s still the default), where the sidebar doesn’t have any other background on top of it:

image.png (966×960 px, 271 KB)

In Vector 2022, the background is (as far as I’ve noticed) only visible if you later make the browser wide enough that it switches to the wider layout and has some leftover space on the sides (the rest of the page evidently gets a more specific background that makes the one on the <body> irrelevant):

image.png (2×3 px, 1018 KB)

What should have happened instead?:

No black background on the <body> after closing the video.

Other information (browser name/version, screenshots, etc.):

The background comes from this CSS rule:

body:has(.oo-ui-windowManager-fullscreen .mw-tmh-media-dialog) {
  background-color: #000;
}

Event Timeline

Change #1018344 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/TimedMediaHandler@master] Only set the body's background to black when window is active

https://gerrit.wikimedia.org/r/1018344

Change #1018352 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/TimedMediaHandler@master] Only set the body's background to black when window is active

https://gerrit.wikimedia.org/r/1018352

Change #1018352 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Only set the body's background to black when window is active

https://gerrit.wikimedia.org/r/1018352

Change #1018344 abandoned by TheDJ:

[mediawiki/extensions/TimedMediaHandler@master] Only set the body's background to black when window is active

Reason:

Already done in I8c24e48fe63dea46b0a691607d6255093f848a88 (there were 2 patchsets, because i pushed this during maintenance hours)

https://gerrit.wikimedia.org/r/1018344