Fix bug 53321

This commit is contained in:
JuliaSvinareva 2021-10-25 14:37:08 +03:00
parent 79ba2a5b7b
commit b0247c6e5c

View file

@ -105,7 +105,7 @@ Common.UI.HintManager = new(function() {
_arrEnAlphabet = [], _arrEnAlphabet = [],
_arrQwerty = [], _arrQwerty = [],
_arrEnQwerty = [], _arrEnQwerty = [],
_isAlt = false, _needShow = false,
_hintVisible = false, _hintVisible = false,
_currentLevel = 0, _currentLevel = 0,
_currentSection = document, _currentSection = document,
@ -381,7 +381,7 @@ Common.UI.HintManager = new(function() {
_clearHints(); _clearHints();
}); });
$(document).on('keyup', function(e) { $(document).on('keyup', function(e) {
if (e.keyCode == Common.UI.Keys.ALT && _isAlt) { if (e.keyCode == Common.UI.Keys.ALT && _needShow) {
e.preventDefault(); e.preventDefault();
if (!_hintVisible) { if (!_hintVisible) {
$('input:focus').blur(); // to change value in inputField $('input:focus').blur(); // to change value in inputField
@ -399,7 +399,7 @@ Common.UI.HintManager = new(function() {
} else if (_hintVisible) { } else if (_hintVisible) {
e.preventDefault(); e.preventDefault();
} }
_isAlt = false; _needShow = false;
}); });
$(document).on('keydown', function(e) { $(document).on('keydown', function(e) {
if (_hintVisible) { if (_hintVisible) {
@ -490,7 +490,7 @@ Common.UI.HintManager = new(function() {
} }
} }
_isAlt = (e.keyCode == Common.UI.Keys.ALT); _needShow = (e.keyCode == Common.UI.Keys.ALT && !Common.Utils.ModalWindow.isVisible());
}); });
}; };