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

Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': '#/lobby/' is not a valid selector #145

Closed
ezzatron opened this issue Jan 27, 2015 · 2 comments
Labels

Comments

@ezzatron
Copy link
Contributor

Just encountered this bug when mixing an AngularJS single-page app with iframe-resizer. This is happening in findTarget(), which is being called from checkLocationHash().

The resizer code is assuming that any URI fragment represents an anchor/element within the page, which is not always true. Perhaps you could simply surround in a try/catch, or check the fragment against a regex before looking for a target element?

@davidjbradshaw
Copy link
Owner

Ah good point, I think rather than try catch, just testing for '/' in the string should catch the issue.

@davidjbradshaw
Copy link
Owner

Thank you for the PR on this.

Released as v2.8.2

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

No branches or pull requests

2 participants