mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 03:30:02 +08:00
fix(ngMobile): emit click event for touchy clicks
Previously, no handlers for the click event would be called for the fast, touch-based ngMobile clicks, only for desktop browser clicks. Now the event will fire properly for all clicks. Closes #3219 Closes #3218 Closes #3137
This commit is contained in:
committed by
Igor Minar
parent
d87fa00423
commit
fb7d891dac
@@ -358,4 +358,20 @@ describe('ngClick (mobile)', function() {
|
||||
});
|
||||
|
||||
|
||||
describe('the normal click event', function() {
|
||||
it('should be capturable by other handlers', inject(function($rootScope, $compile) {
|
||||
var called = false;
|
||||
|
||||
element = $compile('<div ng-click="event = $event" ></div>')($rootScope);
|
||||
|
||||
element.on('click', function() {
|
||||
called = true;
|
||||
});
|
||||
|
||||
browserTrigger(element, 'touchstart', [], 10, 10);
|
||||
browserTrigger(element, 'touchend', [], 10, 10);
|
||||
|
||||
expect(called).toEqual(true);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user