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);