Skip to content

High performance self-hosted photo and video management solution.

chore(web): ignore shortcut toggle when entering email and password (#12082)

Alexaac6a4b0524a
diff --git a/web/src/lib/actions/shortcut.ts b/web/src/lib/actions/shortcut.ts
index fca1ed7ef8..d28c294a89 100644
--- a/web/src/lib/actions/shortcut.ts
+++ b/web/src/lib/actions/shortcut.ts
@@ -20,7 +20,7 @@ export const shouldIgnoreShortcut = (event: KeyboardEvent): boolean => {
return false;
}
const type = (event.target as HTMLInputElement).type;
- return ['textarea', 'text', 'date', 'datetime-local'].includes(type);
+ return ['textarea', 'text', 'date', 'datetime-local', 'email', 'password'].includes(type);
};
export const matchesShortcut = (event: KeyboardEvent, shortcut: Shortcut) => {
@@ -53,7 +53,6 @@ export const shortcuts = <T extends HTMLElement>(
): ActionReturn<ShortcutOptions<T>[]> => {
function onKeydown(event: KeyboardEvent) {
const ignoreShortcut = shouldIgnoreShortcut(event);
-
for (const { shortcut, onShortcut, ignoreInputFields = true, preventDefault = true } of options) {
if (ignoreInputFields && ignoreShortcut) {
continue;