Fix ULS dialog positioning in some cases
In development environment, ev.currentTarget is the button. In Beta Cluster, however, once ext.uls.mediawiki is loaded, it is now the document (the event has bubbled up). I do not know what causes the difference, but we can use the target. Bug: T276255 Change-Id: Ie4c425510293a6f2ce81e4bf4a353f2c8d86d412
This commit is contained in:
@@ -461,7 +461,7 @@
|
|||||||
mw.loader.using( 'ext.uls.mediawiki' ).then( function () {
|
mw.loader.using( 'ext.uls.mediawiki' ).then( function () {
|
||||||
var $target, parent, languageNodes, standalone, uls;
|
var $target, parent, languageNodes, standalone, uls;
|
||||||
|
|
||||||
$target = $( ev.currentTarget );
|
$target = $( ev.target );
|
||||||
parent = document.querySelectorAll( '.mw-portlet-lang, #p-lang' )[ 0 ];
|
parent = document.querySelectorAll( '.mw-portlet-lang, #p-lang' )[ 0 ];
|
||||||
languageNodes = parent ? parent.querySelectorAll( '.interlanguage-link-target' ) : [];
|
languageNodes = parent ? parent.querySelectorAll( '.interlanguage-link-target' ) : [];
|
||||||
standalone = isUsingStandaloneLanguageButton();
|
standalone = isUsingStandaloneLanguageButton();
|
||||||
|
|||||||
Reference in New Issue
Block a user