Open yogeshgadge opened 8 years ago
Seems to me that in some browsers touchend is not firing or there is a delay. But touchmove seems fine which is doing the trick.
The issue happens whenever I get an actual click event is generated. Following code fixes the problem.
$scope.offAllEvents();
if ( event.type === 'touchstart'){
$document.on('touchend', $scope.upFn);
$document.on('touchmove', $scope.moveFn);
} else if ( event.type === 'mousedown' ){
//Fix listen to even on the element
$contentsElm.on('mouseup', $scope.upFn);
//This never got fired
//$document.on('mouseup', $scope.upFn);
$document.on('mousemove', $scope.moveFn);
}
Steps to reproduce
Observed behavior
After a few touch (or even the first header touch) sorting is not working. Its a hit or miss.
Expected behavior
On touching the header each time it should work.
Additional Info
If a user tries to drag a column it works.