aboutsummaryrefslogtreecommitdiffstats
path: root/resources/src
diff options
context:
space:
mode:
authorDerk-Jan Hartman <hartman.wiki@gmail.com>2018-05-08 22:46:56 +0200
committerJdlrobson <jrobson@wikimedia.org>2018-05-10 00:00:21 +0000
commit9114fbfdaea90a092c42b2530a6995a56449e69d (patch)
tree938477e4c2da22e381af50ac226cb0a444e48bdf /resources/src
parent2d46c9e574c559281439a924441683776ca2f2e0 (diff)
downloadmediawikicore-9114fbfdaea90a092c42b2530a6995a56449e69d.tar.gz
mediawikicore-9114fbfdaea90a092c42b2530a6995a56449e69d.zip
makeCollapsible: fix state of nested collapsibles
When collapsing or expanding an element which has nested other collapsibles, the labels of all nested toggles were updating to the value of the parent, while their state was not. Apply to the specific toggle only, just as the classes are applied to just the specific toggle. Bug: T168689 Change-Id: I1c3c29dc9ca4ccbf8da83796e56964a7a6d58a81
Diffstat (limited to 'resources/src')
-rw-r--r--resources/src/jquery/jquery.makeCollapsible.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/resources/src/jquery/jquery.makeCollapsible.js b/resources/src/jquery/jquery.makeCollapsible.js
index e355196ed4c2..c3d7dbf2f12d 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -190,7 +190,7 @@
collapseText = options.toggleText.collapseText;
expandText = options.toggleText.expandText;
- $textContainer = $collapsible.find( '.mw-collapsible-text' );
+ $textContainer = $toggle.find( '.mw-collapsible-text' );
if ( $textContainer.length ) {
$textContainer.text( wasCollapsed ? collapseText : expandText );
}