-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Even domEvents = true, stopPropogation is not working #1064
Comments
This is likely to be related to my issue over at the ... unfortunately I didn't get an answer over there but maybe we can come up with some solution here? 😃 |
In fact I use event.target and it's class name to avoid this problem. But I just think it's not a good solution. |
Yeah, I also thought of "flagging" the already handled but, all in all I think this is a qualified bug as it simply should not fire twice... I know that everyone is short on schedule for their open-source projects, but would you mind to take a look at this @arschmitz @runspired ? thanks a ton 👍 |
I think this particular issue is because the tap event is fired on the "up" event (pointerup / mouseup / touchend), and those are listened to by hammer at the window, not the dom element itself. So, stopping propagation when the event is already at the window does not prevent the other recognizer from receiving it. Listening for move / up events on the window is common practice, and allows gestures to still be detected as they leave the original target element. Two potential workarounds I can think of:
|
The first one sounds good! |
I've also run into this issue… For now I've worked around it by stopping In my situation, I've got a child element type that is sometimes scrollable. If it's scrollable, then There're There're also Luckily there's some space around the child elements that'll mean that the UX is not broken, just tricky (if the users swipe left or right in the padding surrounding a scrollable child element, the I've also implemented this scenario for the native |
I have two elements. One is a parent with tap handler, the other is a child with tap handler. Tapping child should not trigger parent's tap handler. But in fact, it trigger!
I search for a while, but cannot find any solution.
Setting domtEvents: true cannot solve this problem.
Is a a bug? Or I need to set up something else?
Here is my code: http://codepen.io/lqzerogg/pen/wgKJwj
The text was updated successfully, but these errors were encountered: