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

Iframe content is not persisting for cached tabs #221

Open
adityatoshniwal opened this issue Oct 9, 2023 · 9 comments
Open

Iframe content is not persisting for cached tabs #221

adityatoshniwal opened this issue Oct 9, 2023 · 9 comments

Comments

@adityatoshniwal
Copy link

adityatoshniwal commented Oct 9, 2023

I open a tab where are I have form. Once the form is submitted a page is loaded.
But, as soon as I change the layout the tab goes blank.
Edit: The tab content is an iframe. cached:true doesn't work with iframes.

@adityatoshniwal
Copy link
Author

@rinick This is very urgent to us as our release is stuck because of this single issue only. We've completely ported pgAdmin(https://www.pgadmin.org/) to use rc-dock until we found this issue. Can you guide me? I can work on the fix.

@agwidarsito
Copy link

We have the same problem :(

@adityatoshniwal
Copy link
Author

@agwidarsito I managed to get it working. Checkout - https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/static/js/helpers/Layout/LayoutIframeTab.jsx

@emman24
Copy link

emman24 commented May 22, 2024

@adityatoshniwal how you manage to fix the issue on floating tabs?

image

@adityatoshniwal
Copy link
Author

@adityatoshniwal how you manage to fix the issue on floating tabs?

Hey, try setting zIndex as well along with other styles.

@emman24
Copy link

emman24 commented May 27, 2024

@adityatoshniwal thanks a lot.

@AlbinAndersson96
Copy link

@adityatoshniwal Hello!

Experiencing something similar, but not quite the same as you. When changing the layout in such a manner that it splits the DockBox, the Iframes in the tabs all completely reload, resulting in a flash of unloaded content.

Is this something that you see as well in your fixed version?

@adityatoshniwal
Copy link
Author

adityatoshniwal commented Jun 19, 2024

Hi @AlbinAndersson96,
Sharing the screen recording where we've used it. The SQL editor here is an iframe.
https://github.com/ticlo/rc-dock/assets/31855755/25b7dcf4-61ff-42f4-8a00-d217c81e77ce

@AlbinAndersson96
Copy link

AlbinAndersson96 commented Jun 20, 2024

Thanks for the recording @adityatoshniwal .

I've tried emulating what you guys did in our codebase, the major difference being that we use FluentUI instead of MUI, and thus have a different Portal component.
It's very strange. What we're seeing is that the iframe completely reloads when the layout is modified (we can see it fetching from cache in the browser network tab), even though we're now rendering everything completely outside the dockbox.

Edit: Enabling the dock-cache combined with your fix fixed our issue! Thanks a ton for sharing it!

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