kornelski / slip

Slip.js — UI library for manipulating lists via swipe and drag gestures
BSD 2-Clause "Simplified" License
2.44k stars 213 forks source link

Click events not working on Android Chrome #17

Closed hitesh-iksula closed 10 years ago

hitesh-iksula commented 10 years ago

I have Chrome v 35.0.191.141 on my Android phone. I have elements inside the lists that listen to a click event. These events are not getting triggered on mobile browser. They are working on desktop Chrome however. Is this a known issue?

howderek commented 10 years ago

Could you create a JSFiddle that reproudces the problem?

hitesh-iksula commented 10 years ago

Try this out: http://jsfiddle.net/k7jVv/ It will work on desktop but it is not working on my Android Chrome. Let me know if there's anything more I can help you out with.

howderek commented 10 years ago

I was able to reproduce the behavior. I believe it has to do with touch events being handled differently than mouseup/mousedown. I am not sure if this is a chrome issue or a slip issue.

I won't be able to take a look at it in detail until I get back home in a few days.

hitesh-iksula commented 10 years ago

Alright! Let me know if you get a solution for this. Slip is an awesome library btw. Cheers!

kornelski commented 10 years ago

Try latest version 41928cf188134a6afb88544390242112f6372baa

I suspect mouseup/touchend event of a tap was being "eaten" by the library unintentionally

hitesh-iksula commented 10 years ago

Awesome! Looks like it did the trick! I will play around with this a little more. I hope this change in code doesn't impact anything though? Thanks for a quick resolution!

kornelski commented 10 years ago

I'm glad it works. The change is a bit risky though, will cause the bug you saw if somebody relied on slip:tap event's buggy behavior.

hitesh-iksula commented 10 years ago

Oh. I'm not sure I understand correctly. Was the slip:tap event buggy as it was or it became buggy because of the change you just made?

kornelski commented 10 years ago

It was buggy. It should be OK now.

If somebody liked the buggy behavior, they'll need to change their code.

hitesh-iksula commented 10 years ago

Well, in that case I can use this without guilt! Thanks a ton!