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

Bug when using multiple lightbox at same page #5

Open
tanzeel opened this issue Sep 19, 2019 · 2 comments
Open

Bug when using multiple lightbox at same page #5

tanzeel opened this issue Sep 19, 2019 · 2 comments

Comments

@tanzeel
Copy link

tanzeel commented Sep 19, 2019

Hi,

Library has one bug when using multiple time on same page. It also appears on your website https://lcweb.it/lc-lightbox (not every time but some time js error appear about blocking the iframe and lightbox doesn't work). Link of screenshot of your website: https://ibb.co/s9MCNCB

Can you please suggest how to fix it?

Tanzeel

@LCweb-ita
Copy link
Owner

Hello Tanzeel,
I tried multiple times playing with it, but never faced the issue. You area also the only one reporting it.

Finally: the first cross-origin on your side is about Facebook, a whitelisted domain that normally doesn’t trigger that error.

@tanzeel
Copy link
Author

tanzeel commented Sep 20, 2019

Yeah, but it shouldn't break anyway.

$.each(lcl_objs, function(i, v) { if(JSON.stringify(v) == JSON.stringify(obj)) { already_init = v; return false; } });

This comparison is problematic in my case. When initializing lightbox using selector, i don't think this is going to matter anyway. Removing this piece of code fixed my problem. I don't see this calling twice in my case. Is there any corner case where this code is useful?

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

2 participants