Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

angular-touch with jQuery fails to "fastclick" #4001

Closed
mkadan opened this issue Sep 13, 2013 · 8 comments
Closed

angular-touch with jQuery fails to "fastclick" #4001

mkadan opened this issue Sep 13, 2013 · 8 comments
Assignees

Comments

@mkadan
Copy link

mkadan commented Sep 13, 2013

If jQuery is loaded before AngularJS it uses it and fails to get proper touches/changedTouches properties from TouchEvent in

angular-touch.js:1.2-RC2
353:element.on('touchstart', function(event) {
380:element.on('touchend', function(event) {

adding
event = event.originalEvent;
solves the issue

@gcallsen
Copy link

For those who see this, some additional detail in this pull request: https://github.com/jasonals/angular.js/commit/418d28cb6b5bf5dab8a6fc36aad75ec3c8123c32

@dos1
Copy link

dos1 commented Mar 29, 2014

Why isn't is merged in yet? Breaking core behavior by including jQuery feels like a serious issue to me...

@sebastianzillessen
Copy link

Any updates? I have the same issue using ngTouch from angularjs v1.2.16 and jQuery v2.1.0.

@jackcallister
Copy link

+1 on getting a fix.

@MarZab
Copy link

MarZab commented Jul 8, 2014

+1

@jackcallister
Copy link

Try adding jquery after angular-touch - seems to work for me.

@andrezero
Copy link

+1 angular 1.3.8 / jQuery 1.11.2

@petebacondarwin
Copy link
Member

There is a PR #8584 as noted above but until it has a valid unit test proving the patch then we are not able to merge it. Anyone want to help with this?

mgol added a commit that referenced this issue Mar 31, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event objects. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes #4001
Closes #8584
Closes #10797
mgol added a commit to mgol/angular.js that referenced this issue Mar 31, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event objects. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes angular#4001
Closes angular#8584
Closes angular#10797
mgol added a commit to mgol/angular.js that referenced this issue Mar 31, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event object. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes angular#4001
Closes angular#8584
Closes angular#10797
mgol added a commit to mgol/angular.js that referenced this issue Mar 31, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event object. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes angular#4001
Closes angular#8584
Closes angular#10797
mgol added a commit to mgol/angular.js that referenced this issue Mar 31, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event object. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes angular#4001
Closes angular#8584
Closes angular#10797
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue Apr 2, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event object. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes angular#4001
Closes angular#8584
Closes angular#10797
@mgol mgol closed this as completed in 06a9f0a Apr 2, 2015
mgol added a commit that referenced this issue Apr 2, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event object. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes #4001
Closes #8584
Closes #10797
Closes #11488
@mgol mgol modified the milestones: 1.4.0-beta.7 / 1.3.16, Backlog Apr 2, 2015
netman92 pushed a commit to netman92/angular.js that referenced this issue Aug 8, 2015
If jQuery was used with Angular the touch logic was looking for touches
under the original event object. However, jQuery wraps all events, keeping
the original one under the originalEvent property and copies/normalizes some
of event properties. Not all properties are copied, e.g. touches which caused
them to not be recognized properly.

Thanks to @mcmar & @pomerantsev for original patch ideas.

Fixes angular#4001
Closes angular#8584
Closes angular#10797
Closes angular#11488
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants