Page MenuHomePhabricator

.vector-sticky-header-visible class still applied when viewport is too small for it to be shown
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

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

  • Go to https://en.wikipedia.org/wiki/Nauru
  • Open developer tools
  • Add the following CSS: body.vector-sticky-header-visible { --color-base: red; }
  • Scroll down so the sticky header becomes visible, to see the CSS take effect
  • Make the viewport width smaller than the desktop cutoff (1120px)
  • Scroll up and down from the top again

What happens?:

  • The class is added and removed from body even when the header isn't actually visible (because it is hidden with CSS at lower viewports)

What should have happened instead?:

  • The class should stay true to its name, and only be present when the sticky header is actually visible (whether or not that is due to viewport size)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

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

Event Timeline

Change #1196916 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/skins/Vector@master] Only add vector-sticky-header-visible when it is actually visible

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

jhsoby updated the task description. (Show Details)

Change #1196916 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Only add vector-sticky-header-visible when it is actually visible

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

This was deployed last week on the train.

The issue looks fixed to me, with the vector-sticky-header-visible css class only added to the body element when the sticky header is visible (on wider viewports)

Jdrewniak subscribed.

LGTM, I don't see any visible changes as a result of this.