wzr1337 / angular-gestures

AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.
MIT License
510 stars 100 forks source link

stopPropagation doesn't work (but works with direct Hammer usage) #18

Closed emirotin closed 9 years ago

emirotin commented 10 years ago

Here's the sample Plunker: http://plnkr.co/edit/7j2M0dFsk3swuAWKYsS9?p=preview Whichever square you click the same text is shown: "Wrapper clicked"

To prove there's no mistake in code: go to script.js and comment out line 9. Now "Inner clicked" properly shows.

Now the same Plunker but with raw Hammer + jQuery (same Hammer version, 1.0.5): http://plnkr.co/edit/lIAb8tN8RqtYBikkMI3J?p=preview

To prove stopPropagation actually works here: go to stript.js and comment out line 17. Now it behaves as the 1st one.

BTW updating Hammer would also make sense, 1.0.5 is more than 1 year old.

arthuryeti commented 10 years ago

I have the same issue.

When I click on something, it does click on the underlying elements.

For exemple a modal with a form behind.

Do you have any ideas @wzr1337 ?

emirotin commented 10 years ago

In addition looks that events are capturing instead of bubbling — I have the event on parent before it fires on child.

arthuryeti commented 10 years ago

@emirotin what do you mean by that ?

jonnydungeons commented 10 years ago

Have you found a fix for this severe bug? I would say this is important to fix because most angular apps are used in mobile / tablet setting and the ui typically have mobile-ish elements which reveal nested DOM and events.

wzr1337 commented 9 years ago

closing here, continuing under

https://github.com/wzr1337/angular-gestures/issues/23