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

Possible to set target of lightbox to be the parent of an iframe? #101

Open
khoker opened this issue Jul 25, 2020 · 3 comments
Open

Possible to set target of lightbox to be the parent of an iframe? #101

khoker opened this issue Jul 25, 2020 · 3 comments

Comments

@khoker
Copy link

khoker commented Jul 25, 2020

Currently embedding a Vue page via an iframe into a larger project I don't control and using this lightbox (nice component, btw) inside that iframe.

I'm curious and have been skimming the code to see if there is a relatively straightforward solution to setting the target of the lightbox to be the iframe's parent, if that makes sense.

Any initial thoughts are appreciated.

@janosrusiczki
Copy link

I don't think you can break out from your iframe. It's a browser security feature.

Do you have any examples to prove me wrong? 😄

@pexea12
Copy link
Owner

pexea12 commented Jul 28, 2020

@khoker It is better if you can provide an example on codepen

@RafaelScharf
Copy link

I found this solution:
https://en.stackoverflow.com/questions/386304/alterar-div-pai-dentro-de-um-frame-filho

It is in Portuguese, but see the example: https://jsfiddle.net/30jtgs8n/

Maybe it's possible

@janosrusiczki See if this applies to your question

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

4 participants