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

Content inside iframe fails to render when fixed element is present and height & width are set to 100% #249

Open
Oudwins opened this issue Nov 29, 2023 · 3 comments

Comments

@Oudwins
Copy link

Oudwins commented Nov 29, 2023

Obligatory notice: I am still quite new to all this... Sorry for my ignorance in advance.

Description of the issue
The content inside of the iframe fails to render when using nextjs

When the issue occurs
There might be more cases, but I have identified that the issue occurs when there is a fixed positioned element outside the iframe and the iframe height & width is set to 100% when using nextjs

Minimal sandbox
https://stackblitz.com/edit/stackblitz-starters-blgci5?file=app%2Fpage.tsx

Am I willing to submit a PR
Potentially but I have no idea what is happening so if someone could at least point me in the right direction I would appreciate it.

@Oudwins
Copy link
Author

Oudwins commented Nov 29, 2023

Upon further testing, this seems like it might be related to nextjs SSR. The issue seems to be fixed if you force the entire component or page to load on the client

@edge-rps
Copy link

Obligatory notice: I am still quite new to all this... Sorry for my ignorance in advance.

Description of the issue The content inside of the iframe fails to render when using nextjs

When the issue occurs There might be more cases, but I have identified that the issue occurs when there is a fixed positioned element outside the iframe and the iframe height & width is set to 100% when using nextjs

Minimal sandbox https://stackblitz.com/edit/stackblitz-starters-blgci5?file=app%2Fpage.tsx

Am I willing to submit a PR Potentially but I have no idea what is happening so if someone could at least point me in the right direction I would appreciate it.

Thank you for reporting @Oudwins I had the same issue with NextJS Static, I switched my project to use Vite React and that fixed the problem.

@Oudwins
Copy link
Author

Oudwins commented Mar 25, 2024

Oh man. This was so long ago I don't even remember if I fixed it or what.... good to know of a work around though.

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