Closed revolunet closed 8 years ago
Working in latest chrome, safari, internet explorer 11, cordova with android 5.1, if I find something wrong I'll report
After testing this directive, I can tell this is not a viable solution, sometimes it produces a weird behavior in touch devices. For now, this is working for me: @revolunet
.directive('rnCarouselClick', ['$parse', function($parse){
return {
compile: function(element, attr) {
var fn = $parse(attr.sirTap, /* interceptorFn */ null, /* expensiveChecks */ true);
return function ngEventHandler(scope, element) {
var click = true;
element.on('click', function(event) {
if (click){
var callback = function() {
fn(scope, {$event:event});
};
scope.$apply(callback);
}
});
element.on('touchstart mousedown', function(){
click = true;
});
element.on('touchmove mousemove', function(){
click = false;
});
};
}
};
}])
Hi ! Thanks for reporting !
sorry i can't maintain this lib anymore but if someone is motivated, i can give contributors access after a first PR :)
While swiping on desktop, ngTouch triggers a click if your
<li>
has angClick
Here's a workaround to prevent this unwanted behaviour :