Close the language settings if clicked outside
Make the behavior consistant with ULS language selector Change-Id: I9bfc29f908ebe48a1bb9cdcdede75a5d5aa3839d
This commit is contained in:
@@ -63,11 +63,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
listen: function () {
|
listen: function () {
|
||||||
var that = this;
|
var langSettings = this;
|
||||||
// Register all event listeners to the ULS language settings here.
|
// Register all event listeners to the ULS language settings here.
|
||||||
that.$element.on( 'click', $.proxy( that.show, that ) );
|
langSettings.$element.on( 'click', $.proxy( langSettings.show, langSettings ) );
|
||||||
that.$window.find( '#languagesettings-close' )
|
langSettings.$window.find( '#languagesettings-close' )
|
||||||
.on( 'click', $.proxy( that.hide, that ) );
|
.on( 'click', $.proxy( langSettings.hide, langSettings ) );
|
||||||
|
|
||||||
|
// hide this window if clicking elsewhere
|
||||||
|
$( document ).on( 'click', $.proxy( langSettings.hide, langSettings ) );
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user