-
Notifications
You must be signed in to change notification settings - Fork 27.3k
fix(ngTouch): ngClick directive does not use correct event with jQuery #4583
Conversation
|
Thanks for the PR!
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
|
This issue seems to be a duplicate of #3556. |
|
Although they both perform the same function, I feel like this is a cleaner and better way to do it. This removes duplicated logic and simplifies the code a bit. Things might start to get confusing at his point https://github.com/angular/angular.js/pull/3556/files#diff-6baa668d8987507ba9244376d3c69a14R232 when the originalEvent is getting checked for twice. |
|
I agree. This is a cleaner implementation. I just faced the same issue, so I started looking in the issue-tracker, so this was a heads-up. |
|
Yeah I did the same thing when I ran into this issue. I was hoping a fix would be implemented for 1.2 but no such luck. |
|
This PR could do with some unit tests... |
|
|
|
I added the same implementation to the $swipe service. #3556 is accomplishing the same thing. I think this might be a cleaner solution. I'm having trouble trying to accompany this with a unit test. Since it's a "private" method its hard to test that functionality explicitly. The stuff I can test against, like the event object, is already being tested for the same things I would check against. If anybody has any suggestions please let me know and I'll write the test. I'm just stumped right now. |
The ngClick directive is not using the correct touch object when jQuery is loaded.
02dc2aa to
fd2d6c0
Compare
cad9560 to
f294244
Compare
e8dc429 to
e83fab9
Compare
4dd5a20 to
998c61c
Compare
|
This was added as part of 06a9f0a |
The ngClick directive is not using the correct touch object when jQuery is loaded. This caused the coordinates to get mapped to undefined instead of the actual x and y coordinates. This logic was happening in multiple places so I extracted it into a function to help with simplicity.