Fix the cancel event function to prevent erroneous close

Changed the conditions for the cancel event function so
that the ULS popup does not close when a descendant element
of the trigger is clicked.

Bug: T122722
Change-Id: I4575804c991b5b597b9eed60f6f0bd6112753e0c
This commit is contained in:
victorbarbu
2016-01-01 16:57:24 +02:00
parent 269819da47
commit c3078239dd

View File

@@ -319,7 +319,7 @@
* On cancel handler for the uls menu * On cancel handler for the uls menu
*/ */
cancel: function ( e ) { cancel: function ( e ) {
if ( e && this.$element.is( e.target ) ) { if ( e && ( this.$element.is( e.target ) || $.contains( this.$element[0], e.target ) ) ) {
return; return;
} }