mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-27 03:05:10 +02:00
feat: Manage downloads and local media
This commit is contained in:
@@ -109,6 +109,7 @@ export class Selectable {
|
||||
right: undefined
|
||||
};
|
||||
private focusByDefault: boolean = false;
|
||||
private canFocusEmpty: boolean = true;
|
||||
private trapFocus: boolean = false;
|
||||
private isInitialized: boolean = false;
|
||||
private navigationActions: NavigationActions = {};
|
||||
@@ -213,7 +214,7 @@ export class Selectable {
|
||||
isFocusable(): boolean {
|
||||
if (!this.isActive) return false;
|
||||
|
||||
if (this.htmlElement) {
|
||||
if (this.htmlElement && this.canFocusEmpty) {
|
||||
return this.htmlElement.tabIndex >= 0;
|
||||
} else {
|
||||
for (const child of this.children) {
|
||||
@@ -445,6 +446,11 @@ export class Selectable {
|
||||
this.trapFocus = trapFocus;
|
||||
return this;
|
||||
}
|
||||
|
||||
setCanFocusEmpty(canFocusEmpty: boolean) {
|
||||
this.canFocusEmpty = canFocusEmpty;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
export function handleKeyboardNavigation(event: KeyboardEvent) {
|
||||
|
||||
Reference in New Issue
Block a user