Improved key event handling

This commit is contained in:
the-djmaze 2023-02-21 14:26:37 +01:00
parent 81d521c562
commit 1c1b043a50
7 changed files with 35 additions and 43 deletions

View file

@ -12,7 +12,7 @@ import { KeyboardShortcutsHelpPopupView } from 'View/Popup/KeyboardShortcutsHelp
import { AccountPopupView } from 'View/Popup/Account';
import { ContactsPopupView } from 'View/Popup/Contacts';
import { doc, leftPanelDisabled, fireEvent, SettingsCapa, registerShortcut } from 'Common/Globals';
import { doc, leftPanelDisabled, fireEvent, stopEvent, SettingsCapa, registerShortcut } from 'Common/Globals';
import { ThemeStore } from 'Stores/Theme';
@ -56,8 +56,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
let email = account?.email;
if (email && 0 === event.button && AccountUserStore.email() != email) {
AccountUserStore.loading(true);
event.preventDefault();
event.stopPropagation();
stopEvent(event);
Remote.request('AccountSwitch',
(iError/*, oData*/) => {
if (iError) {