Meteor-Community-Packages / meteor-autocomplete

Client/server autocompletion designed for Meteor's collections and reactivity.
https://atmospherejs.com/mizzao/autocomplete
MIT License
350 stars 109 forks source link

Callback is not called on touch event #68

Closed ernestorocha closed 9 years ago

ernestorocha commented 9 years ago

I'm not sure the best way to solve this, but recently I just discovered that the Meteor click event (actually jQuery) is not triggered on touch. So, for now, I'm solving this by adding the touchend event to the same element.

I can do a PR adding this event, but I would like to know if someone has a better solution.

mizzao commented 9 years ago

I think people have created plugins that fix this: http://touchpunch.furf.com/ comes to mind.

This is a site or Meteor-level problem, and not really specific to this package. So it wouldn't really make sense to patch it here.

ernestorocha commented 9 years ago

Hm, I did a little research to overcome this problem but I didn't find anything useful. But this plugin sounds promising!

I just tried it, and the autocomplete is still not being triggered on Android.

Anyway, thanks! I'll try to find another plugin!

mizzao commented 9 years ago

I've implemented the selection using jQuery events instead of callbacks now.

What was the problem here? Is it that the selection doesn't happen, or the callback is not triggered on a selection?

ernestorocha commented 9 years ago

I think the problem was that callback wasn't triggered.

Anyway, now it seems you solved the problem this way. I removed the touchend event and the autocomplete is still working! Thanks.

mizzao commented 9 years ago

I don't think that I solved anything, it must have been Meteor upgraded something to support touch events as clicks.