Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS13 scrolling and swiping conflict? #1237

Closed
sk29110 opened this issue Sep 30, 2019 · 5 comments
Closed

iOS13 scrolling and swiping conflict? #1237

sk29110 opened this issue Sep 30, 2019 · 5 comments

Comments

@sk29110
Copy link

sk29110 commented Sep 30, 2019

After upgrading to v13 dialog swiping stop working I have some events registered on swipeleft and swiperight but nothing is called when i swipe diagonally. Is anybody experiencing this? This only happen when the content gets longer than the view size. I am using the latest.

hammertime.on('swipeleft',
function (ev) {
alert('hello');
});

@longgt
Copy link

longgt commented Oct 1, 2019

Try to turn off the following setting

Settings -> Safari -> Advanced -> Experimental Features -> Pointer Events

iOS 13 supports Pointer Event, so HammerJS seems to recognize Pointer Event instead of Touch.

@sk29110
Copy link
Author

sk29110 commented Oct 1, 2019

But since this is the default option and it's not user friendly we should have the fix or the workaround

@sk29110
Copy link
Author

sk29110 commented Oct 1, 2019

I resolved it by listening to hammer.input event.

var myElement = document.getElementById('gallery');
var mc = new Hammer(myElement);

//catch all events hammer input events
mc.on("hammer.input", (ev) => {
if(ev.eventType === 8 ){
//touch event direction left
if(ev.direction === 2){
//action when swipe left
//touch event direction right
}else if(ev.direction === 4 ){
//action when swipe right
}
}
});

@longgt
Copy link

longgt commented Oct 3, 2019

#1084

@sk29110
Copy link
Author

sk29110 commented Oct 3, 2019

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants