mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Bugfix: MouseEvent.which is not reliable
This commit is contained in:
parent
56df186e8d
commit
5601e100d9
3 changed files with 3 additions and 4 deletions
|
|
@ -48,7 +48,7 @@ export class AbstractSystemDropDownUserView extends AbstractViewRight {
|
||||||
}
|
}
|
||||||
|
|
||||||
accountClick(account, event) {
|
accountClick(account, event) {
|
||||||
if (account && event && undefined !== event.which && 1 === event.which) {
|
if (account && 0 === event.button) {
|
||||||
AccountStore.accounts.loading(true);
|
AccountStore.accounts.loading(true);
|
||||||
setTimeout(() => AccountStore.accounts.loading(false), 1000);
|
setTimeout(() => AccountStore.accounts.loading(false), 1000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -435,8 +435,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
||||||
let el = eqs(event, 'a');
|
let el = eqs(event, 'a');
|
||||||
if (el) {
|
if (el) {
|
||||||
return !(
|
return !(
|
||||||
!!event &&
|
0 === event.button &&
|
||||||
3 !== event.which &&
|
|
||||||
mailToHelper(
|
mailToHelper(
|
||||||
el.href,
|
el.href,
|
||||||
Settings.capa(Capa.Composer) ? ComposePopupView : null
|
Settings.capa(Capa.Composer) ? ComposePopupView : null
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@
|
||||||
if (e && target) {
|
if (e && target) {
|
||||||
let evt = new Event(type, {bubbles:true,cancelable:true});
|
let evt = new Event(type, {bubbles:true,cancelable:true});
|
||||||
evt.button = 0;
|
evt.button = 0;
|
||||||
evt.which = evt.buttons = 1;
|
evt.buttons = 1;
|
||||||
// copy event properties into new event
|
// copy event properties into new event
|
||||||
['altKey','ctrlKey','metaKey','shiftKey'].forEach(k => evt[k] = e[k]);
|
['altKey','ctrlKey','metaKey','shiftKey'].forEach(k => evt[k] = e[k]);
|
||||||
let src = e.touches ? e.touches[0] : e;
|
let src = e.touches ? e.touches[0] : e;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue