diff --git a/web/src/lib/actions/shortcut.ts b/web/src/lib/actions/shortcut.ts index d28c294a89..df155ea821 100644 --- a/web/src/lib/actions/shortcut.ts +++ b/web/src/lib/actions/shortcut.ts @@ -15,7 +15,7 @@ export type ShortcutOptions = { preventDefault?: boolean; }; -export const shouldIgnoreShortcut = (event: KeyboardEvent): boolean => { +export const shouldIgnoreEvent = (event: KeyboardEvent | ClipboardEvent): boolean => { if (event.target === event.currentTarget) { return false; } @@ -52,7 +52,7 @@ export const shortcuts = ( options: ShortcutOptions[], ): ActionReturn[]> => { function onKeydown(event: KeyboardEvent) { - const ignoreShortcut = shouldIgnoreShortcut(event); + const ignoreShortcut = shouldIgnoreEvent(event); for (const { shortcut, onShortcut, ignoreInputFields = true, preventDefault = true } of options) { if (ignoreInputFields && ignoreShortcut) { continue; diff --git a/web/src/lib/components/shared-components/drag-and-drop-upload-overlay.svelte b/web/src/lib/components/shared-components/drag-and-drop-upload-overlay.svelte index e84d2d66f0..6f92d81886 100644 --- a/web/src/lib/components/shared-components/drag-and-drop-upload-overlay.svelte +++ b/web/src/lib/components/shared-components/drag-and-drop-upload-overlay.svelte @@ -1,11 +1,12 @@