- Go to https://test.wikipedia.org/wiki/Main_Page?useskinversion=2
- Run OO.ui.Element.static.scrollIntoView( $('#Bureaucrats') )
- Nothing happens
- Go to https://test.wikipedia.org/wiki/Main_Page?useskinversion=1 and try the same thing
- The "Bureaucrats" heading is scrolled into view, as expected
This happens because <div class="mw-page-container"> has overflow-y: auto. This confuses OO.ui.Element.static.getClosestScrollableContainer into thinking that mw-page-container, rather than the body, is the element it needs to scroll. Disabling this rule in the style inspector fixes the issue.
I'm not sure if the right approach here is to remove the overflow-y: auto rule from mw-page-container (presumably it's there for a reason, but it's probably not intended to make that div a scrollable container), or to make getClosestScrollableContainer smarter and have it look at other signs of scrollability (e.g. el.scrollHeight > el.clientHeight)
See also T255162: OO.ui.Element.static.scrollIntoView is broken for the previous time scrollIntoView was broken.
The overflow-y also causes the issues described in T271868.
QA Results - Beta
QA Results - Prod