From 9fd92cc3c93a6378e8887fd46fd4ad182a375544 Mon Sep 17 00:00:00 2001 From: Steven Sojka Date: Wed, 4 Sep 2013 11:20:33 -0500 Subject: fix(ngTouch): ngClick does not pass touchend event when jQuery is loaded The trigger handler event in jqLite takes an event object as a second parameter, but jQuery requires an array of parameters. This is causing the touchend event to not come thtough in the click handler when jQuery is loaded. --- test/jqLiteSpec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/jqLiteSpec.js') diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index 08100658..de9c74da 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -1343,6 +1343,18 @@ describe('jqLite', function() { event = pokeSpy.mostRecentCall.args[0]; expect(event.preventDefault).toBeDefined(); }); + + it('should pass data as an additional argument', function() { + var element = jqLite('poke'), + pokeSpy = jasmine.createSpy('poke'), + data; + + element.on('click', pokeSpy); + + element.triggerHandler('click', [{hello: "world"}]); + data = pokeSpy.mostRecentCall.args[1]; + expect(data.hello).toBe("world"); + }); }); -- cgit v1.2.3