From 9c3566f7d5a7e437588d48518d4dbe6cf6acb2ce Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 13 Jan 2022 23:31:07 +0300 Subject: [PATCH] limit messageBox focus shift to config-dialog --- js/dlg/message-box.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/dlg/message-box.js b/js/dlg/message-box.js index c3e446b3..f7008d77 100644 --- a/js/dlg/message-box.js +++ b/js/dlg/message-box.js @@ -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