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

Proxy's iframe element takes place in DOM #49

Closed
RoniGordin opened this issue Dec 22, 2022 · 9 comments
Closed

Proxy's iframe element takes place in DOM #49

RoniGordin opened this issue Dec 22, 2022 · 9 comments

Comments

@RoniGordin
Copy link

RoniGordin commented Dec 22, 2022

When calling proxy method, the injected iframe element still takes place in DOM, I see the current hiding method is using the next props for the iframe's style -

width: 0;
height: 0;
border: none;

(inside proxy function)
Screen Shot 2022-12-22 at 11 49 12

Using display: none; instead solves the problem for me,
but I'm still trying to figure out if it can mess up any other functionality and if so, is there another solution?

@jcubic
Copy link
Owner

jcubic commented Dec 22, 2022

Are you sure you mean to take place in DOM? display: none doesn't remove the element from DOM. But I need to check if display: none makes Cross Domain work on every platform. I don't remember why it's like this, but this was probably added for a reason.

@ballonura
Copy link

ballonura commented Dec 22, 2022

Are you sure you mean to take place in DOM? display: none doesn't remove the element from DOM. But I need to check if display: none makes Cross Domain work on every platform. I don't remember why it's like this, but this was probably added for a reason.

Maybe we should consider add a style obj, that can dynamically apply to the brand new iframe element?

@RoniGordin
Copy link
Author

Are you sure you mean to take place in DOM? display: none doesn't remove the element from DOM. But I need to check if display: none makes Cross Domain work on every platform. I don't remember why it's like this, but this was probably added for a reason.

Sorry, I meant it takes space, the element containing it overflows

@jcubic
Copy link
Owner

jcubic commented Dec 22, 2022

Will check maybe the iframe has padding, or maybe because it's an inline element.

@jcubic
Copy link
Owner

jcubic commented Dec 22, 2022

@RoniGordin For me, it has a size 0x0px so it doesn't take up any space. Maybe you have other CSS that is applied globally.

but I can add

position: absolute;
left: 0;
top: 0;

or even -99999px; so it's outside the page.

jcubic added a commit that referenced this issue Dec 22, 2022
@jcubic
Copy link
Owner

jcubic commented Dec 22, 2022

Should be fixed now

@jcubic
Copy link
Owner

jcubic commented Dec 22, 2022

@ballonura by style object if you mean style tag: <style></style> then I would prefer to not include additional DOM elements, we have only a single iframe tag. But maybe if users will use more than one iframe that will make sense.

@ballonura
Copy link

@ballonura by style object if you mean style tag: <style></style> then I would prefer to not include additional DOM elements, we have only a single iframe tag. But maybe if users will use more than one iframe that will make sense.

Thx for the quick response.

@RoniGordin
Copy link
Author

Should be fixed now

Tested now, looks perfect
Thank you so much! 🙏

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

3 participants