Resolve #265 regarding shortcuts in certain input fields.

As we want other shortcuts do work in input fields (which couldn't in previous releases).
This commit is contained in:
the-djmaze 2022-03-04 14:43:58 +01:00
parent 54f48fbe4d
commit a503329b77
5 changed files with 35 additions and 28 deletions

View file

@ -13,7 +13,7 @@ import { KeyboardShortcutsHelpPopupView } from 'View/Popup/KeyboardShortcutsHelp
import { AccountPopupView } from 'View/Popup/Account';
import { ContactsPopupView } from 'View/Popup/Contacts';
import { doc, leftPanelDisabled, fireEvent, SettingsCapa } from 'Common/Globals';
import { doc, leftPanelDisabled, fireEvent, SettingsCapa, registerShortcut } from 'Common/Globals';
import { ThemeStore } from 'Stores/Theme';
@ -123,7 +123,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
}
onBuild() {
shortcuts.add('m', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
registerShortcut('m', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
if (!this.viewModelDom.hidden) {
MessageUserStore.fullScreen(false);
this.accountMenuDropdownTrigger(true);
@ -132,7 +132,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
});
// shortcuts help
shortcuts.add('?,f1,help', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
registerShortcut('?,f1,help', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
if (!this.viewModelDom.hidden) {
showScreenPopup(KeyboardShortcutsHelpPopupView);
return false;