Skip to content
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

Child element event not triggering before 'body' #643

Closed
Baccanno opened this issue Aug 10, 2014 · 3 comments
Closed

Child element event not triggering before 'body' #643

Baccanno opened this issue Aug 10, 2014 · 3 comments

Comments

@Baccanno
Copy link

I used to map a lot of events to $(document) in v1, in v2 it's all buggy (mainly because document does not have a style property).

line 997 this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;

image

I switched to $(body)

Plus my events attached to child dom elements are not triggered.

Eg. this does not happen anymore

   $(".build-hammer").on("tap", function (e) {
        e.stopPropagation();
        //blablabla
    }.bind(this));

Its like bubbling was the other way round.

@Baccanno
Copy link
Author

starting my app with this dirty hack fixed the first issue document.style = {}

However I still can't get my events to work properly.

@LaurentMox
Copy link

I am having the same issue with hammer v2 (2.0.4 precisely) concerning child elements not triggering 'panstart' and 'panmove' before parent elements when nested. Did you manage to make it work or is this a bug?
Thanks

@jtangelder
Copy link
Member

Fixed it, but when applying it to the document, you now loose all styles attributes and are responsible for adding them yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants