Closed Ericson578 closed 12 years ago
Hi Ericson578,
I've created a test page here: http://hotstudio.github.com/touchy/test-pages/swipe.html which is aliased here: http://goo.gl/hSLPV
I can't seem to recreate your alternating bug on that test page. The swipe event fires every time. I'm testing it with an iPod Touch, running 5.1.1. Please test it with your device and let me know if you are still seeing the bug.
Thanks!
Thanks for setting that up. You're right, I can't reproduce the bug on your test code. The only difference that is immediately apparent is I used bind instead of on, and my code has several absolutely positioned divs. I'll let you know if I figure out what was causing the issue.
If you take a look at the comments at the bottom of my code (https://github.com/HotStudio/touchy/blob/master/test-pages/swipe.html) for that test page, you'll see that I was experiencing a similar issue with jQuery's toggle() method, while trying to use the native touchstart (not Touchy) event for the "easy swipe" button. I didn't take the time to figure out if that was my bug or something deeper in jQuery. I just wrote my own toggle function instead. Are you using toggle? Just a thought.
turns out it was my fault. I was using an alert to let me know when a swipe was detected, and that's what was causing the next swipe not to get detected.
turned off the alerts and used a method similar to your $logger and the swipe detection worked perfect! Thanks for your help :)
tested on ios 5.1
after a swipe event triggers and calls it's handler, the next swipe doesn't get called. The 3rd swipe does, and the pattern repeats.