mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-23 21:46:07 +08:00
Fix click buttons in alt-focus mode
This commit is contained in:
@ -355,17 +355,17 @@ Common.UI.ScreenReaderFocusManager = new(function() {
|
||||
} else if (e.keyCode == Common.UI.Keys.RETURN || e.keyCode == Common.UI.Keys.SPACE) {
|
||||
if (btn) {
|
||||
if (btn.attr('for')) { // to trigger event in checkbox
|
||||
$('#' + btn.attr('for')).trigger(jQuery.Event('click', {which: 1}));
|
||||
(e.keyCode == Common.UI.Keys.RETURN) ? $('#' + btn.attr('for')).trigger(jQuery.Event('click', {which: 1})) : e.preventDefault(); // prevent type space in document
|
||||
} else {
|
||||
btn.trigger(jQuery.Event('click', {which: 1}));
|
||||
if (btn.data('tab') === 'file' || isFileMenu && _currentLevel === 1 || isBtnCategory)
|
||||
btn.trigger(jQuery.Event('click', {which: 1}));
|
||||
else
|
||||
setTimeout(function() {btn.trigger(jQuery.Event('click', {which: 1}));}, 1); // click on toolbar buttons
|
||||
}
|
||||
if (btn.data('toggle') !== 'dropdown') btn.blur();
|
||||
}
|
||||
if (btn && btn.data('tab') === 'file' || isFileMenu && _currentLevel === 1) {
|
||||
_nextLevel();
|
||||
_setCurrentSection(btn);
|
||||
} else if (btn && isBtnCategory && btn.hasClass('active')) {
|
||||
_isSidePanelMode = true;
|
||||
if (btn && btn.data('tab') === 'file' || isFileMenu && _currentLevel === 1 || isBtnCategory && btn.hasClass('active')) {
|
||||
(isBtnCategory && btn.hasClass('active')) && (_isSidePanelMode = true);
|
||||
_nextLevel();
|
||||
_setCurrentSection(btn);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user