Do nothing if the clicked region is already selected
Supposed to fix bug https://bugzilla.wikimedia.org/show_bug.cgi?id=39932
This commit is contained in:
@@ -125,12 +125,11 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
click: function( e ) {
|
click: function( e ) {
|
||||||
|
// Don't do anything if a region is selected already
|
||||||
if( this.$element.hasClass( 'active' ) ) {
|
if( this.$element.hasClass( 'active' ) ) {
|
||||||
this.$element.removeClass( 'active' );
|
return;
|
||||||
if ( this.options.noresults ) {
|
|
||||||
this.options.noresults.call();
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// Re-populate the list of languages
|
// Re-populate the list of languages
|
||||||
this.options.$target.empty();
|
this.options.$target.empty();
|
||||||
this.show();
|
this.show();
|
||||||
@@ -141,7 +140,6 @@
|
|||||||
this.$element.addClass( 'active' );
|
this.$element.addClass( 'active' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RegionSelector plugin definition */
|
/* RegionSelector plugin definition */
|
||||||
|
|||||||
Reference in New Issue
Block a user