Skip to content

Commit bdc35d9

Browse files
committed
clear events on
1 parent 40157b5 commit bdc35d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/angular-sortable-view.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,14 @@
353353
return $scope.$index;
354354
}
355355
};
356+
var handle = $element;
357+
356358
$controllers[1].addToSortableElements(sortableElement);
357359
$scope.$on('$destroy', function(){
358360
$controllers[1].removeFromSortableElements(sortableElement);
361+
handle.off('mousedown touchstart', onMousedown);
359362
});
360363

361-
var handle = $element;
362364
handle.on('mousedown touchstart', onMousedown);
363365
$scope.$watch('$ctrl.handle', function(customHandle){
364366
if(customHandle){

0 commit comments

Comments
 (0)