parent
dcdb4be10b
commit
c57fef7b1e
|
@ -329,6 +329,7 @@ function focusAccessibility() {
|
|||
if (focusables.includes(el.localName)) {
|
||||
if (el.dataset.focusedViaClick === undefined) {
|
||||
el.dataset.focusedViaClick = '';
|
||||
focusAccessibility.lastFocusedViaClick = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -337,6 +338,7 @@ function focusAccessibility() {
|
|||
|
||||
function keepOutlineOnTab(event) {
|
||||
if (event.which === 9) {
|
||||
focusAccessibility.lastFocusedViaClick = false;
|
||||
setTimeout(keepOutlineOnTab, 0, true);
|
||||
return;
|
||||
} else if (event !== true) {
|
||||
|
|
|
@ -36,6 +36,10 @@ function messageBox({
|
|||
messageBox.originalFocus = document.activeElement;
|
||||
moveFocus(messageBox.element, 1);
|
||||
|
||||
if (focusAccessibility.lastFocusedViaClick && document.activeElement) {
|
||||
document.activeElement.dataset.focusedViaClick = '';
|
||||
}
|
||||
|
||||
if (typeof onshow === 'function') {
|
||||
onshow(messageBox.element);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user