fix autofocus in popups, follow-up to 5bb1b5ef

This commit is contained in:
tophf 2020-12-09 18:47:26 +03:00
parent 72330b480b
commit 246d0a3bad
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ define(require => {
]),
$create('p.beautify-hint', [
$create('span', t('styleBeautifyHint') + '\u00A0'),
createHotkeyInput(HOTKEY_ID, () => moveFocus($('#help-popup'), 1)),
createHotkeyInput(HOTKEY_ID, () => moveFocus($('#help-popup'), 0)),
]),
$create('.buttons', [
$create('button', {

View File

@ -87,7 +87,7 @@ define(require => {
mess.originalFocus = document.activeElement;
// skip external links like feedback
while ((moveFocus(mess.element, 1) || {}).target === '_blank') {/*NOP*/}
while ((moveFocus(mess.element, 0) || {}).target === '_blank') {/*NOP*/}
// suppress focus outline when invoked via click
if (focusAccessibility.lastFocusedViaClick && document.activeElement) {
document.activeElement.dataset.focusedViaClick = '';