From bd78bdc9961b14c1523c4375b5f99f4374a1083c Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Tue, 6 Oct 2015 10:43:46 +0530 Subject: [PATCH] Update jquery.uls to d4de09ffb94dd9682 * Improve the hide-show logic of ULS Bug: T114123 Change-Id: If7a23b035edf3117520a9c313997a26c7b6c4857 --- lib/jquery.uls/src/jquery.uls.core.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/jquery.uls/src/jquery.uls.core.js b/lib/jquery.uls/src/jquery.uls.core.js index 201d384d..529b47a8 100644 --- a/lib/jquery.uls/src/jquery.uls.core.js +++ b/lib/jquery.uls/src/jquery.uls.core.js @@ -177,9 +177,6 @@ this.initialized = true; } - // hide any other visible ULS - $( '.uls-menu' ).hide(); - this.$menu.show(); this.$menu.scrollIntoView(); this.shown = true; @@ -321,7 +318,11 @@ /** * On cancel handler for the uls menu */ - cancel: function () { + cancel: function ( e ) { + if ( e && this.$element.is( e.target ) ) { + return; + } + this.hide(); if ( this.options.onCancel ) { @@ -353,10 +354,7 @@ } }, - click: function ( e ) { - e.stopPropagation(); - e.preventDefault(); - + click: function () { if ( this.shown ) { this.hide(); } else {