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