Fix issue in touch. When moving to a point and back to origin tap got fired. #561

Merged
merged 1 commit into from Sep 17, 2013

Projects

None yet

2 participants

@tobibo

To fix it measure the deltaX and deltaY and only tap if deltaX and deltaY are smaller then 30.

@madrobby
Owner

Hi @tobibo this seems like a great fix. Can you rebase it on current master so we can merge it? Sorry for the long delay… :(

@tobibo tobibo Fix issue where tap was fired when touching and moving to a point and…
… back to the origin. To fix it measure the deltaX and deltaY and only tap if deltaX and deltaY are smaller then 30.
63829c7
@tobibo

Hi thanks @madrobby, i rebased it. Hope it mere is smooth :)

@madrobby madrobby merged commit 9937686 into madrobby:master Sep 17, 2013

1 check passed

Details default The Travis CI build passed
@madrobby
Owner

@tobibo I'm having second thoughts on this. What's your specific use case?

Note that after testing with native apps on various platforms, on iOS usually taps are still fired even if you move the finger away and back onto an element; whereas on Android they aren't. I don't necessarily want to diverge between the platforms, but I'm inclined to do this the iOS way. Note that scrolling cancels taps anyway (or should cancel them, at least).

@tobibo

@madrobby Yeah, I try to remember as it was a year ago. It was a issue on iOS devices with hardware accelerated scrolling on:

-webkit-overflow-scrolling: touch;

The app back then was not targeted towards Android. I think it is a problem with that hardware accelerated scrolling. I am trying to create a test page for that in the next days.. would that help?

@madrobby
Owner

Yeah definitely. Maybe this could be an option in the touch module, so you can set it to not do it on iOS, but do it on Android, to be closer to the default behavior of native apps on those devices.

@tobibo

Hi @madrobby i actually have second thoughts on it now as well, as it was a year ago and i am not working on that project anymore where i had this issue, i think it probably was quite a unique issue for us back then. Probably best to revert it and if someone runs into this again they can have a deeper look. Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment