fixup c57fef7b: always set lastFocusedViaClick

#495
This commit is contained in:
tophf 2018-09-06 20:42:48 +03:00
parent 26d7c26770
commit 4a877ad27b

View File

@ -337,9 +337,9 @@ function focusAccessibility() {
function suppressOutlineOnClick({target}) {
for (let el = target, i = 0; el && i++ < GIVE_UP_DEPTH; el = el.parentElement) {
if (focusAccessibility.ELEMENTS.includes(el.localName)) {
focusAccessibility.lastFocusedViaClick = true;
if (el.dataset.focusedViaClick === undefined) {
el.dataset.focusedViaClick = '';
focusAccessibility.lastFocusedViaClick = true;
}
return;
}