From 0cc7f2f54b4b17f0bb2e1d589b52e69c02d9c4a5 Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Mon, 2 May 2016 17:27:18 +0530 Subject: [PATCH] Call onCancel from hide See issue #215 The cancel, hide methods are still confusing, may be in some other patch we need clean up this. A grep shows ULS use onCancel only with compact language links. Change-Id: I0e08d169952945237efce9108d51cb68c4a29ad5 --- src/jquery.uls.core.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jquery.uls.core.js b/src/jquery.uls.core.js index c24464f..a43b1a0 100644 --- a/src/jquery.uls.core.js +++ b/src/jquery.uls.core.js @@ -189,6 +189,10 @@ hide: function () { this.$menu.hide(); this.shown = false; + + if ( this.options.onCancel ) { + this.options.onCancel.call( this ); + } }, /** @@ -310,10 +314,6 @@ } this.hide(); - - if ( this.options.onCancel ) { - this.options.onCancel.call( this ); - } }, keyup: function ( e ) {