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

For some reason it started to catch a DOMException when image is clicked #70

Open
domjanzsoo opened this issue May 23, 2021 · 3 comments
Labels

Comments

@domjanzsoo
Copy link

Probably the exception is thrown due to a recent change I made, but I cannot find any concrete answer to what causes the following exception error. I found a stackoverflow hint that it can be a CORS restriction.
Untitled

@PavelTurk
Copy link

I have the same problem. I got js and css files of 1.6.4 version from unpkg and when image is clicked I get Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL in Chrome. Firefox gives Uncaught DOMException: The operation is insecure. Could anyone say how to solve this problem? I use pure JS without jquery.

@domjanzsoo
Copy link
Author

I think my problem was that the capture data attribute on my tag was the same for every image. If you're looping through a set of images, try to set a counter variable, and after increasing this counter at each loop cycle use it to set a unique data-capture and a unique id for the actual tag. Hope that helps.

@uidev1116
Copy link
Contributor

@domjanzsoo @PavelTurkish
Hi. This issue is caused by the browser URL and the image URL having different origin like http://localhost:8000 and https://127.0.0.1:8000.
Please fix, so that the origin is the same.

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

3 participants