forked from mirrors/bookwyrm
Merge pull request #730 from mouse-reeve/js-style
JS linting and whitespace fixes
This commit is contained in:
commit
efcb552f9a
1 changed files with 203 additions and 203 deletions
|
@ -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 tablist’s 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) {
|
||||
|
|
Loading…
Reference in a new issue