Skip to content

Commit

Permalink
Merge pull request 'Fix click buttons in alt-focus mode' (#106) from …
Browse files Browse the repository at this point in the history
…fix/bugfix into hotfix/v8.2.1
  • Loading branch information
Julia Radzhabova committed Oct 30, 2024
2 parents b2a8447 + 5b020f3 commit 2011495
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/common/main/lib/controller/ScreenReaderFocus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2011495

Please sign in to comment.