From 76105ffb225c1baa1645c468fce1f338dffd91ca Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 16 Mar 2016 15:48:39 +0300 Subject: [PATCH] Bug 31933 --- apps/common/main/lib/component/ComboBoxFonts.js | 7 +++---- apps/common/main/resources/less/combobox.less | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js index 53c6b9dce..4cbee5417 100644 --- a/apps/common/main/lib/component/ComboBoxFonts.js +++ b/apps/common/main/lib/component/ComboBoxFonts.js @@ -158,10 +158,9 @@ define([ if (e.keyCode == Common.UI.Keys.UP || e.keyCode == Common.UI.Keys.DOWN) { _.delay(function() { - var selected = me.cmpEl.find('ul li.selected a'); - - if (selected.length<=0) - selected = me.cmpEl.find('ul li:not(.divider):first a'); + var selected = (e.keyCode == Common.UI.Keys.DOWN) ? me.cmpEl.find('ul li.selected').nextAll('li:not(.divider)') : me.cmpEl.find('ul li.selected').prevAll('li:not(.divider)'); + selected = (selected.length>0) ? selected.eq(0) : ((e.keyCode == Common.UI.Keys.DOWN) ? me.cmpEl.find('ul li:not(.divider):first') : me.cmpEl.find('ul li:not(.divider):last')); + selected = selected.find('a'); me._skipInputChange = true; selected.focus(); diff --git a/apps/common/main/resources/less/combobox.less b/apps/common/main/resources/less/combobox.less index 449f0536d..d4792cf34 100644 --- a/apps/common/main/resources/less/combobox.less +++ b/apps/common/main/resources/less/combobox.less @@ -67,7 +67,9 @@ color: @dropdown-link-active-color; &:hover, - &.hover { + &.hover, + &:focus, + &.focus { background-color: @primary; } }