Fire hook when compact language links are opened

Following on from Icc64044d, we fire the
mw.uls.compact_language_links.open hook whenever that treatment is
opened (and not only the first time that the triggering element is
clicked).

Bug: T281928
Change-Id: I6fa966c22c738ca12bcbeb0225c03f3f8394ecee
This commit is contained in:
Sam Smith
2021-05-11 12:15:55 +01:00
parent d4217b487b
commit 8e85f0d611
2 changed files with 2 additions and 2 deletions

View File

@@ -91,6 +91,8 @@ function launchULS( $trigger, languagesObject, forCLS ) {
},
onVisible: function () {
$trigger.addClass( 'selector-open' );
mw.hook( 'mw.uls.compact_language_links.open' ).fire();
},
languageDecorator: function ( $languageLink, language ) {
var element = languagesObject[ language ];