mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-03-03 18:28:48 +08: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) {
|
||||
if (account && event && undefined !== event.which && 1 === event.which) {
|
||||
if (account && 0 === event.button) {
|
||||
AccountStore.accounts.loading(true);
|
||||
setTimeout(() => AccountStore.accounts.loading(false), 1000);
|
||||
}
|
||||
|
|
|
@ -435,8 +435,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
let el = eqs(event, 'a');
|
||||
if (el) {
|
||||
return !(
|
||||
!!event &&
|
||||
3 !== event.which &&
|
||||
0 === event.button &&
|
||||
mailToHelper(
|
||||
el.href,
|
||||
Settings.capa(Capa.Composer) ? ComposePopupView : null
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
if (e && target) {
|
||||
let evt = new Event(type, {bubbles:true,cancelable:true});
|
||||
evt.button = 0;
|
||||
evt.which = evt.buttons = 1;
|
||||
evt.buttons = 1;
|
||||
// copy event properties into new event
|
||||
['altKey','ctrlKey','metaKey','shiftKey'].forEach(k => evt[k] = e[k]);
|
||||
let src = e.touches ? e.touches[0] : e;
|
||||
|
|
Loading…
Reference in a new issue