Merge pull request #730 from mouse-reeve/js-style

JS linting and whitespace fixes
This commit is contained in:
Mouse Reeve 2021-03-13 12:37:34 -08:00 committed by GitHub
commit efcb552f9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -301,7 +301,7 @@ class TabGroup {
case this.keys.down:
this.determineOrientation(event);
break;
};
}
}
// Handle keyup on tabs
@ -313,7 +313,7 @@ class TabGroup {
case this.keys.right:
this.determineOrientation(event);
break;
};
}
}
// When a tablists aria-orientation is set to vertical,
@ -328,17 +328,17 @@ class TabGroup {
if (key === this.keys.up || key === this.keys.down) {
event.preventDefault();
proceed = true;
};
}
}
else {
if (key === this.keys.left || key === this.keys.right) {
proceed = true;
};
};
}
}
if (proceed) {
this.switchTabOnArrowPress(event);
};
}
}
// Either focus the next, previous, first, or last tab
@ -348,7 +348,7 @@ class TabGroup {
for (let button of this.buttons) {
button.addEventListener('focus', this.focusEventHandler.bind(this));
};
}
if (this.direction[pressed]) {
var target = event.target;
@ -434,8 +434,8 @@ class TabGroup {
else {
// If no value is specified, default to 300ms
delay = 300;
};
};
}
}
return delay;
}
@ -444,7 +444,7 @@ class TabGroup {
var target = event.target;
setTimeout(this.checkTabFocus.bind(this), this.delay, target);
};
}
// Only activate tab on focus if it still has focus after the delay
checkTabFocus(target) {
@ -454,4 +454,4 @@ class TabGroup {
this.activateTab(target, false);
}
}
}
}