mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
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:
parent
54f48fbe4d
commit
a503329b77
5 changed files with 35 additions and 28 deletions
|
|
@ -2,7 +2,7 @@ import { koArrayWithDestroy } from 'External/ko';
|
|||
|
||||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { ComposeType } from 'Common/EnumsUser';
|
||||
import { doc } from 'Common/Globals';
|
||||
import { registerShortcut } from 'Common/Globals';
|
||||
import { arrayLength, pInt } from 'Common/Utils';
|
||||
import { download, computedPaginatorHelper, showMessageComposer } from 'Common/UtilsUser';
|
||||
|
||||
|
|
@ -449,15 +449,12 @@ export class ContactsPopupView extends AbstractViewPopup {
|
|||
onBuild(dom) {
|
||||
this.selector.init(dom.querySelector('.b-list-content'), ScopeContacts);
|
||||
|
||||
shortcuts.add('delete', '', ScopeContacts, () => {
|
||||
if (doc.activeElement && doc.activeElement.matches('input,textarea')) {
|
||||
return true;
|
||||
}
|
||||
registerShortcut('delete', '', ScopeContacts, () => {
|
||||
this.deleteCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
shortcuts.add('c,w', '', ScopeContacts, () => {
|
||||
registerShortcut('c,w', '', ScopeContacts, () => {
|
||||
this.newMessageCommand();
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue