From f6c85143c6fc298af9e4a5f657567a04885bdbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 13 Dec 2022 23:11:32 +0100 Subject: [PATCH] Mark active sections even when their headings are in wrapper elements This partially reverts 94c7f3108217787cb974d1e256da60f733d01910. Headings inside wrapper divs etc. actually are rendered in the table of contents. Bug: T318044 Bug: T324869 Change-Id: Ie3181d9e9605cd2b5897b12931572057e80d6661 --- resources/skins.vector.es6/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/skins.vector.es6/main.js b/resources/skins.vector.es6/main.js index 73b7c152d..e5bd12512 100644 --- a/resources/skins.vector.es6/main.js +++ b/resources/skins.vector.es6/main.js @@ -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,