Switch the current tab to the new language only if it was not Ctrl/Command/Shift-Click
Bug: T189582 Change-Id: Ib497be874b3d559a8f1715d09160378f0c43881e
This commit is contained in:
@@ -134,11 +134,17 @@
|
|||||||
* Language selection handler
|
* Language selection handler
|
||||||
*
|
*
|
||||||
* @param {string} language language code
|
* @param {string} language language code
|
||||||
|
* @param {Object} event jQuery event object
|
||||||
*/
|
*/
|
||||||
onSelect: function ( language ) {
|
onSelect: function ( language, event ) {
|
||||||
self.$trigger.removeClass( 'selector-open' );
|
self.$trigger.removeClass( 'selector-open' );
|
||||||
mw.uls.addPreviousLanguage( language );
|
mw.uls.addPreviousLanguage( language );
|
||||||
|
|
||||||
|
// Switch the current tab to the new language,
|
||||||
|
// unless it was Ctrl-click or Command-click
|
||||||
|
if ( !event.metaKey && !event.shiftKey ) {
|
||||||
location.href = self.interlanguageList[ language ].href;
|
location.href = self.interlanguageList[ language ].href;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onVisible: function () {
|
onVisible: function () {
|
||||||
var offset, height, width, triangleWidth;
|
var offset, height, width, triangleWidth;
|
||||||
|
|||||||
Reference in New Issue
Block a user