mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-11 16:59:09 +00:00
Mark active sections even when their headings are in wrapper elements
This partially reverts94c7f31082
. Headings inside wrapper divs etc. actually are rendered in the table of contents. Bug: T318044 Bug: T324869 Change-Id: Ie3181d9e9605cd2b5897b12931572057e80d6661 (cherry picked from commitf6c85143c6
)
This commit is contained in:
parent
e7cd7df568
commit
24f65b0fa1
|
@ -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