diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index bd4229d95..6f27af0a2 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -355,6 +355,7 @@ define([ return false; } else if (e.keyCode == Common.UI.Keys.ESC && this.isMenuOpen()) { + this._input.val(this.lastValue); this.closeMenu(); this.onAfterHideMenu(e); return false; @@ -420,6 +421,7 @@ define([ var me = this; if (e.keyCode == Common.UI.Keys.ESC){ + this._input.val(this.lastValue); this.closeMenu(); this.onAfterHideMenu(e); } else if (e.keyCode == Common.UI.Keys.UP || e.keyCode == Common.UI.Keys.DOWN) { diff --git a/apps/common/main/lib/component/MetricSpinner.js b/apps/common/main/lib/component/MetricSpinner.js index 03e470211..81cf96b1d 100644 --- a/apps/common/main/lib/component/MetricSpinner.js +++ b/apps/common/main/lib/component/MetricSpinner.js @@ -364,6 +364,9 @@ define([ } else { this._fromKeyDown = true; } + + if (e.keyCode == Common.UI.Keys.ESC) + this.setRawValue(this.value); if (e.keyCode==Common.UI.Keys.RETURN || e.keyCode==Common.UI.Keys.ESC) this.trigger('inputleave', this); },