diff options
Diffstat (limited to 'src/ngTouch/directive/ngClick.js')
| -rw-r--r-- | src/ngTouch/directive/ngClick.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ngTouch/directive/ngClick.js b/src/ngTouch/directive/ngClick.js index d6e404ca..7dcc4041 100644 --- a/src/ngTouch/directive/ngClick.js +++ b/src/ngTouch/directive/ngClick.js @@ -238,7 +238,7 @@ ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement', } if (!angular.isDefined(attr.disabled) || attr.disabled === false) { - element.triggerHandler('click', event); + element.triggerHandler('click', [event]); } } @@ -255,9 +255,9 @@ ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement', // - On mobile browsers, the simulated "fast" click will call this. // - But the browser's follow-up slow click will be "busted" before it reaches this handler. // Therefore it's safe to use this directive on both mobile and desktop. - element.on('click', function(event) { + element.on('click', function(event, touchend) { scope.$apply(function() { - clickHandler(scope, {$event: event}); + clickHandler(scope, {$event: (touchend || event)}); }); }); |
