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
}
});
Instead of adding handlers for both
clickandtouchEnd, use the fastclick library. Now you just need to add a handler for theclickevent. If your using ember-cli, there is an addon for this.