ajout passive : true sur touchstart, cf doc dans le script
This commit is contained in:
parent
b66747ea3a
commit
32ea154947
1 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,10 @@
|
|||
/*
|
||||
* gamuSwipe v1.0.0 2019-01-31
|
||||
* gamuSwipe v1.0.1 2019-04-04
|
||||
* https://git.gamuza.fr/scripts/gamuswipe
|
||||
*
|
||||
* arg passive : true
|
||||
* https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
|
||||
* https://developer.mozilla.org/fr/docs/Web/API/EventTarget/addEventListener
|
||||
*/
|
||||
function gamuSwipe(mon_id,handleswipe){
|
||||
window.addEventListener('load', function(){
|
||||
|
@ -14,7 +17,7 @@ function gamuSwipe(mon_id,handleswipe){
|
|||
var touchobj = e.changedTouches[0];
|
||||
dist = 0;
|
||||
startX = touchobj.pageX;
|
||||
}, false);
|
||||
}, {passive: true});
|
||||
|
||||
//touchsurface.addEventListener('touchmove', function(e){
|
||||
//}, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue