From aac6a4b0524ac19a47e4f6632e161f6e166800b7 Mon Sep 17 00:00:00 2001
From: Alex <alex.tran1502@gmail.com>
Date: Tue, 27 Aug 2024 16:50:25 -0500
Subject: [PATCH] chore(web): ignore shortcut toggle when entering email and
 password (#12082)

---
 web/src/lib/actions/shortcut.ts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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;