mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improved key event handling
This commit is contained in:
parent
81d521c562
commit
1c1b043a50
7 changed files with 35 additions and 43 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { Scope } from 'Common/Enums';
|
||||
import { addShortcut } from 'Common/Globals';
|
||||
import { addShortcut, stopEvent } from 'Common/Globals';
|
||||
import { mailBox, settings } from 'Common/Links';
|
||||
//import { setFolderETag } from 'Common/Cache';
|
||||
import { addComputablesTo } from 'External/ko';
|
||||
|
|
@ -80,8 +80,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
setExpandedFolder(folder.fullName, collapsed);
|
||||
|
||||
folder.collapsed(!collapsed);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
stopEvent(event);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { ComposeType, FolderType, MessageSetAction } from 'Common/EnumsUser';
|
|||
import { doc,
|
||||
leftPanelDisabled, toggleLeftPanel,
|
||||
Settings, SettingsCapa,
|
||||
addEventsListeners,
|
||||
addEventsListeners, stopEvent,
|
||||
addShortcut, registerShortcut, formFieldFocused
|
||||
} from 'Common/Globals';
|
||||
|
||||
|
|
@ -412,8 +412,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
moveCommand(vm, event) {
|
||||
if (this.mobileCheckedStateShow()) {
|
||||
if (vm && event?.preventDefault) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
stopEvent(event);
|
||||
}
|
||||
|
||||
let b = moveAction();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import {
|
|||
Settings,
|
||||
SettingsCapa,
|
||||
fireEvent,
|
||||
stopEvent,
|
||||
addShortcut,
|
||||
registerShortcut
|
||||
} from 'Common/Globals';
|
||||
|
|
@ -283,19 +284,18 @@ export class MailMessageView extends AbstractViewRight {
|
|||
|
||||
let el = eqs(event, 'a');
|
||||
if (el && 0 === event.button && mailToHelper(el.href)) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
stopEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
if (eqs(event, '.attachmentsPlace .showPreview')) {
|
||||
event.stopPropagation();
|
||||
stopEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
el = eqs(event, '.attachmentsPlace .showPreplay');
|
||||
if (el) {
|
||||
event.stopPropagation();
|
||||
stopEvent(event);
|
||||
const attachment = ko.dataFor(el);
|
||||
if (attachment && SMAudio.supported) {
|
||||
switch (true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue