Skip to content

High performance self-hosted photo and video management solution.

fix: prevent backspace from accidentally triggering delete modals (#25858)

Michel Heusschenaf1ecaf5cc4a
diff --git a/web/src/lib/services/library.service.ts b/web/src/lib/services/library.service.ts
index 81a140a924..1176e707a6 100644
--- a/web/src/lib/services/library.service.ts
+++ b/web/src/lib/services/library.service.ts
@@ -67,6 +67,7 @@ export const getLibraryActions = ($t: MessageFormatter, library: LibraryResponse
color: 'danger',
onAction: () => handleDeleteLibrary(library),
shortcuts: { key: 'Backspace' },
+ shortcutOptions: { ignoreInputFields: true },
};
const AddFolder: ActionItem = {
diff --git a/web/src/lib/services/user-admin.service.ts b/web/src/lib/services/user-admin.service.ts
index 233eb88657..c132076672 100644
--- a/web/src/lib/services/user-admin.service.ts
+++ b/web/src/lib/services/user-admin.service.ts
@@ -67,6 +67,7 @@ export const getUserAdminActions = ($t: MessageFormatter, user: UserAdminRespons
$if: () => get(authUser).id !== user.id && !user.deletedAt,
onAction: () => modalManager.show(UserDeleteConfirmModal, { user }),
shortcuts: { key: 'Backspace' },
+ shortcutOptions: { ignoreInputFields: true },
};
const getDeleteDate = (deletedAt: string): Date =>