From 0434e49c3ade8aad42a07de819bdacd071e12b96 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Thu, 10 Aug 2023 11:02:13 +0200 Subject: [PATCH] webmail: while attachment viewer is open, don't handle global keyboard shortcuts (like search, going to inbox) feedback from jonathan, thanks! --- webmail/webmail.js | 8 ++++---- webmail/webmail.ts | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/webmail/webmail.js b/webmail/webmail.js index 5966c0c..549b294 100644 --- a/webmail/webmail.js +++ b/webmail/webmail.js @@ -3029,10 +3029,6 @@ const newMsglistView = (msgElem, listMailboxes, setLocationHash, otherMailbox, p updateState(oldstate); }, key: async (k, e) => { - if (attachmentView) { - attachmentView.key(k, e); - return; - } const moveKeys = [ ' ', 'ArrowUp', 'ArrowDown', 'PageUp', 'h', 'H', @@ -4228,6 +4224,10 @@ const init = async () => { } l.push(e.key); const k = l.join(' '); + if (attachmentView) { + attachmentView.key(k, e); + return; + } if (composeView) { await composeView.key(k, e); return; diff --git a/webmail/webmail.ts b/webmail/webmail.ts index b734bc0..90d67a3 100644 --- a/webmail/webmail.ts +++ b/webmail/webmail.ts @@ -2743,11 +2743,6 @@ const newMsglistView = (msgElem: HTMLElement, listMailboxes: listMailboxes, setL }, key: async (k: string, e: KeyboardEvent) => { - if (attachmentView) { - attachmentView.key(k, e) - return - } - const moveKeys = [ ' ', 'ArrowUp', 'ArrowDown', 'PageUp', 'h', 'H', @@ -4469,6 +4464,10 @@ const init = async () => { l.push(e.key) const k = l.join(' ') + if (attachmentView) { + attachmentView.key(k, e) + return + } if (composeView) { await composeView.key(k, e) return