vendredi 26 décembre 2014

Handling a click and a tap but not a scroll

I have an Ember.View that handles both the click and touchEnd events, for both desktop and mobile interactions.


Unfortunately, touchEnd also gets fired when scrolling, which is not intended. How do I handle the click and tap, but avoid the scroll event?



Ember.View.extend({
click: function() {
// not handled in a mobile browser
},
touchEnd: function() {
// handled in a mobile browser, but unfortunately also on scroll
}
});




Aucun commentaire:

Enregistrer un commentaire