1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Ran eslint fix on existing codebase

Had to do some manual fixing of the app.js file due to misplaced
comments
This commit is contained in:
Dan Brown
2023-04-18 22:20:02 +01:00
parent 752ee664c2
commit e711290d8b
106 changed files with 905 additions and 869 deletions

View File

@ -57,7 +57,6 @@ export class KeyboardNavigationHandler {
* @param {KeyboardEvent} event
*/
#keydownHandler(event) {
// Ignore certain key events in inputs to allow text editing.
if (event.target.matches('input') && (event.key === 'ArrowRight' || event.key === 'ArrowLeft')) {
return;
@ -72,7 +71,7 @@ export class KeyboardNavigationHandler {
} else if (event.key === 'Escape') {
if (this.onEscape) {
this.onEscape(event);
} else if (document.activeElement) {
} else if (document.activeElement) {
document.activeElement.blur();
}
} else if (event.key === 'Enter' && this.onEnter) {
@ -88,8 +87,9 @@ export class KeyboardNavigationHandler {
const focusable = [];
const selector = '[tabindex]:not([tabindex="-1"]),[href],button:not([tabindex="-1"],[disabled]),input:not([type=hidden])';
for (const container of this.containers) {
focusable.push(...container.querySelectorAll(selector))
focusable.push(...container.querySelectorAll(selector));
}
return focusable;
}
}
}