vue-image-lightbox icon indicating copy to clipboard operation
vue-image-lightbox copied to clipboard

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

Open khoker opened this issue 5 years ago • 3 comments

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.

khoker avatar Jul 25 '20 14:07 khoker

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? :smile:

janosrusiczki avatar Jul 25 '20 19:07 janosrusiczki

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

pexea12 avatar Jul 28 '20 09:07 pexea12

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

RafaelScharf avatar Dec 31 '20 13:12 RafaelScharf