hammerjs / hammer.js

A javascript library for multi-touch gestures :// You can touch this

Home Page:http://hammerjs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apparently iPadOS 13 is not supported

andreas-web opened this issue · comments

I use iPadOS 13.5.1 and your standard example

let myElement = $('#hammertest')[0];
let mc = new Hammer.Manager(myElement);

let singleTap = new Hammer.Tap({event: 'singletap'});
let doubleTap = new Hammer.Tap({event: 'doubletap', taps: 2});
let tripleTap = new Hammer.Tap({event: 'tripletap', taps: 3});

mc.add([tripleTap, doubleTap, singleTap]);

tripleTap.recognizeWith([doubleTap, singleTap]);
doubleTap.recognizeWith(singleTap);

doubleTap.requireFailure(tripleTap);
singleTap.requireFailure([tripleTap, doubleTap]);

mc.on("singletap doubletap tripletap", function (ev) {
    console.log('Event <b>' + ev.type + '</b> recognized');
});

only recognizes a single tap.

What am I doing wrong?

You probably trigger the zoom function. Try adding the meta tag with user-scalable=no to your head: https://stackoverflow.com/a/10614533
Or the one answer with the touch-action below: https://stackoverflow.com/a/54207844

The results seem to be inconsistent though.

I don't have an iPad so this is just a guess :-) Good luck.