limit messageBox focus shift to config-dialog

This commit is contained in:
tophf 2022-01-13 23:31:07 +03:00
parent cf053382da
commit 9c3566f7d5

View File

@ -59,7 +59,8 @@ messageBox.show = async ({
messageBox._originalFocus = document.activeElement;
// focus the first focusable child but skip the first external link which is usually `feedback`
if ((moveFocus(messageBox.element, 0) || {}).target === '_blank') {
if ((moveFocus(messageBox.element, 0) || {}).target === '_blank' &&
/config-dialog/.test(className)) {
moveFocus(messageBox.element, 1);
}
// suppress focus outline when invoked via click