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

$(document).hammer() error #688

Closed
berkaytheunicorn opened this issue Oct 11, 2014 · 5 comments
Closed

$(document).hammer() error #688

berkaytheunicorn opened this issue Oct 11, 2014 · 5 comments

Comments

@berkaytheunicorn
Copy link

$(document).hammer() i want to bind all dom elements to hammer but I'm getting this error.

TypeError: null is not an object (evaluating 'doc.defaultView')

I migrate my project from 1.x on 1.x there is no such error.

Any ideas?

@berkaytheunicorn
Copy link
Author

by the way on chrome I got this Uncaught TypeError: Cannot read property 'defaultView' of null

@julianxhokaxhiu
Copy link

I'm getting the same error on Chrome too. Any clue?

@berkaytheunicorn
Copy link
Author

I noticed that stoppropagation and prevent defaults won't work properly too parents always firing

@julianxhokaxhiu
Copy link

I found that the issue is related to the fact that hammerjs does not handle window as element, but it's always trying to find it by getting the parent window, useful for iframes for example.

Anyway I've just reported that, see #644 and I think we can close this.

@annam
Copy link
Contributor

annam commented Oct 20, 2014

+1 for fixing this issue, we've temporarily switched all $(document).hammer() declarations to $('body') but that's not at all an ideal solution!

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