Merge pull request #1270 from ONLYOFFICE/fix/bug_53321

Fix bug 53321
This commit is contained in:
Julia Radzhabova 2021-10-25 14:59:02 +03:00 committed by GitHub
commit 2b9dce1765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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