From 95184bc8c70ead9fc65816803dc6b574b413ec01 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 10 Dec 2019 15:30:32 +0300 Subject: [PATCH] Fix Bug 43396 --- apps/common/main/lib/component/ComboBox.js | 2 ++ apps/common/main/lib/component/MetricSpinner.js | 3 +++ 2 files changed, 5 insertions(+) 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); },