From 2272003f445c11406659867d0ae63dbc447b29be Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 25 Sep 2020 22:06:53 +0300 Subject: [PATCH] [Common] Open combobox with arrow down key --- apps/common/main/lib/component/ComboBox.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index abb993cd1..e11cef944 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -348,7 +348,16 @@ define([ }, onAfterKeydownMenu: function(e) { - if (e.keyCode == Common.UI.Keys.RETURN) { + if (e.keyCode == Common.UI.Keys.DOWN && !this.editable && !this.isMenuOpen()) { + this.openMenu(); + var me = this; + _.delay(function() { + me._skipInputChange = true; + me.cmpEl.find('ul li:first a').focus(); + }, 10); + return false; + } + else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) { $(e.target).click(); var me = this; if (this.rendered) {