mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Make touchstart/touchmove events passive
This commit is contained in:
parent
cc046907ed
commit
e02deee4f1
2 changed files with 3 additions and 3 deletions
4
dev/External/SquireUI.js
vendored
4
dev/External/SquireUI.js
vendored
|
|
@ -410,8 +410,8 @@ class SquireUI
|
||||||
input.type = 'button';
|
input.type = 'button';
|
||||||
input.innerHTML = cfg.html;
|
input.innerHTML = cfg.html;
|
||||||
input.action_cmd = cfg.cmd;
|
input.action_cmd = cfg.cmd;
|
||||||
input.addEventListener('touchstart', () => touchTap = input);
|
input.addEventListener('touchstart', () => touchTap = input, {passive:true});
|
||||||
input.addEventListener('touchmove', () => touchTap = null);
|
input.addEventListener('touchmove', () => touchTap = null, {passive:true});
|
||||||
input.addEventListener('touchcancel', () => touchTap = null);
|
input.addEventListener('touchcancel', () => touchTap = null);
|
||||||
input.addEventListener('touchend', e => {
|
input.addEventListener('touchend', e => {
|
||||||
if (touchTap === input) {
|
if (touchTap === input) {
|
||||||
|
|
|
||||||
2
vendors/squire/build/squire-raw.js
vendored
2
vendors/squire/build/squire-raw.js
vendored
|
|
@ -2567,7 +2567,7 @@ proto.addEventListener = function ( type, fn ) {
|
||||||
if ( type === 'selectionchange' ) {
|
if ( type === 'selectionchange' ) {
|
||||||
target = doc;
|
target = doc;
|
||||||
}
|
}
|
||||||
target.addEventListener( type, this, true );
|
target.addEventListener( type, this, {capture:true,passive:'touchstart'===type} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handlers.push( fn );
|
handlers.push( fn );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue