This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ng-touch, mouse event and 'ng-click-active' #3999
Closed
Description
I am building angularjs app that works on both touch and mouse environment. I am pleased to use ng-touch for touch support. I am using 'ng-click-active' for styling pressed state and it works well on touch device. But it does not works well on desktop and mouse environment. 'ng-click-active' is work differently from a :active selector.
- 'ng-click-active' should not be disappeared if mouse down and hold on the element. (chrome and ie)
- 'ng-click-active' should not be disappeared if mouse down and move on the element.
below code makes the problem.
element.on('mousemove mouseup', function(event) {
element.removeClass(ACTIVE_CLASS_NAME);
});
chrome trigger mousemove event even if mouse does not move.