mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 09:30:17 +00:00
Mark active sections even when their headings are in wrapper elements
This partially reverts 94c7f31082
.
Headings inside wrapper divs etc. actually are rendered in the table
of contents.
Bug: T318044
Bug: T324869
Change-Id: Ie3181d9e9605cd2b5897b12931572057e80d6661
This commit is contained in:
parent
f597c53f74
commit
f6c85143c6
|
@ -287,7 +287,7 @@ const main = () => {
|
|||
} );
|
||||
const headingSelector = [
|
||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6'
|
||||
].map( ( tag ) => `.mw-parser-output > ${tag}` ).join( ',' );
|
||||
].map( ( tag ) => `.mw-parser-output ${tag}` ).join( ',' );
|
||||
const sectionObserver = initSectionObserver( {
|
||||
elements: bodyContent.querySelectorAll( `${headingSelector}, .mw-body-content` ),
|
||||
topMargin: header ? header.getBoundingClientRect().height : 0,
|
||||
|
|
Loading…
Reference in a new issue