Bene has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203880
Change subject: Make all headings with class section-heading toggleable
......................................................................
Make all headings with class section-heading toggleable
The class section-heading allows headings to be collapsed
which aren't direct descendants of the #content div. This is
essential for MobileFrontend's support on Wikidata/Wikibase.
There, <h2> headings are wrapped into other divs for several
reasons but should be collapsible as well.
Bug: T95889
Change-Id: Id6d40a06b662020c2d0f03dc16bf9f23d5436952
---
M javascripts/modules/toggling/init.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/80/203880/1
diff --git a/javascripts/modules/toggling/init.js
b/javascripts/modules/toggling/init.js
index d57bf93..d1e4379 100644
--- a/javascripts/modules/toggling/init.js
+++ b/javascripts/modules/toggling/init.js
@@ -200,7 +200,7 @@
$container = $container || $( '#content' );
$( 'html' ).removeClass( 'stub' );
- $firstHeading = $container.find( '> h1,> h2,> h3,> h4,> h5,>
h6' ).eq( 0 );
+ $firstHeading = $container.find( '> h1,> h2,> h3,> h4,> h5,>
h6,.section-heading' ).eq( 0 );
tagName = $firstHeading.prop( 'tagName' ) || 'H1';
if ( collapseSectionsByDefault === undefined ) {
--
To view, visit https://gerrit.wikimedia.org/r/203880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6d40a06b662020c2d0f03dc16bf9f23d5436952
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bene <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits