From c3078239dd7f233a83805657e634ba2ff8b69f11 Mon Sep 17 00:00:00 2001 From: victorbarbu Date: Fri, 1 Jan 2016 16:57:24 +0200 Subject: [PATCH] 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 --- lib/jquery.uls/src/jquery.uls.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jquery.uls/src/jquery.uls.core.js b/lib/jquery.uls/src/jquery.uls.core.js index 529b47a8..76a69c65 100644 --- a/lib/jquery.uls/src/jquery.uls.core.js +++ b/lib/jquery.uls/src/jquery.uls.core.js @@ -319,7 +319,7 @@ * On cancel handler for the uls menu */ cancel: function ( e ) { - if ( e && this.$element.is( e.target ) ) { + if ( e && ( this.$element.is( e.target ) || $.contains( this.$element[0], e.target ) ) ) { return; }