From f76512e513806686661f9ef9d56f3e55ed02284d Mon Sep 17 00:00:00 2001 From: narcolepticinsomniac Date: Fri, 12 Oct 2018 17:38:19 -0400 Subject: [PATCH] Reincorporate 8's updates --- msgbox/msgbox.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/msgbox/msgbox.js b/msgbox/msgbox.js index 84070380..1d69dff3 100644 --- a/msgbox/msgbox.js +++ b/msgbox/msgbox.js @@ -34,7 +34,12 @@ function messageBox({ document.body.appendChild(messageBox.element); messageBox.originalFocus = document.activeElement; - moveFocus(messageBox.element, 1); + // skip external links like feedback + while ((moveFocus(messageBox.element, 1) || {}).target === '_blank') {/*NOP*/} + // suppress focus outline when invoked via click + if (focusAccessibility.lastFocusedViaClick && document.activeElement) { + document.activeElement.dataset.focusedViaClick = ''; + } if (typeof onshow === 'function') { onshow(messageBox.element);