Reincorporate 8's updates

This commit is contained in:
narcolepticinsomniac 2018-10-12 17:38:19 -04:00 committed by GitHub
parent f52fd0d124
commit f76512e513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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