From fa8e0584b1ebca5e4a5704ad109cc9b7b4f0ae68 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 2 Dec 2021 19:47:03 +0300 Subject: [PATCH] [DE PE SSE] Fix bug 54263 --- apps/common/main/lib/component/HintManager.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/component/HintManager.js b/apps/common/main/lib/component/HintManager.js index 170eb68ab..e767d7d11 100644 --- a/apps/common/main/lib/component/HintManager.js +++ b/apps/common/main/lib/component/HintManager.js @@ -446,7 +446,8 @@ Common.UI.HintManager = new(function() { } }, 10); } else { - var curLetter = null; + var curLetter = null, + match = false; var keyCode = e.keyCode; if (keyCode !== 16 && keyCode !== 17 && keyCode !== 18 && keyCode !== 91) { curLetter = _lang === 'en' ? ((keyCode > 47 && keyCode < 58 || keyCode > 64 && keyCode < 91) ? String.fromCharCode(e.keyCode) : null) : e.key; @@ -462,9 +463,16 @@ Common.UI.HintManager = new(function() { _inputLetters = _inputLetters + curLetter.toUpperCase(); for (var i = 0; i < _currentControls.length; i++) { var item = _currentControls[i]; - if (!_isItemDisabled(item) && item.attr('data-hint-title') === _inputLetters) { - curr = item; - break; + if (!_isItemDisabled(item)) { + var title = item.attr('data-hint-title'), + regExp = new RegExp('^' + _inputLetters + ''); + if (regExp.test(title)) { + match = true; + } + if (title === _inputLetters) { + curr = item; + break; + } } } if (curr) { @@ -526,6 +534,8 @@ Common.UI.HintManager = new(function() { } } } + } else if (!match) { + _inputLetters = ''; } } }