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

Rendered list items are reloaded sometimes when scrolling or resizing the window #121

Open
mmmulani opened this issue May 2, 2022 · 3 comments

Comments

@mmmulani
Copy link

mmmulani commented May 2, 2022

Describe the bug
When using an iframe, video, or any web component with implicit state, scrolling or resizing the window (to cause the column count to change) can sometimes cause a complete re-render of a list item causing all the state to be lost.

Example using the default codebox with the first element changed into an iframe of Wikipedia:
https://codesandbox.io/s/masonic-example-forked-52xrvi?file=/src/index.js

Resizing the window such that the column count changes will cause the iframe to be completely reloaded, even though it is within the viewport the whole time.

I looked through the masonic code and it seems to be using key effectively which should prevent this issue but it's still happening. I also found this somewhat relevant issue: whatwg/html#5484 though that seems to be about reparenting which should not be happening in this case.

Desktop (please complete the following information):
MacOS 12.3, Chrome v100, though we have been using Masonic for over a year and seen this issue.

@Doaa-Ismael
Copy link

Yes, even the images reload on the sandbox.

@epurban
Copy link

epurban commented Dec 13, 2022

Having the same issue. @jaredLunde is there an explanation here? Thanks!

@jaredLunde
Copy link
Owner

not sure how unexpected this is. might happen with any windowing library :\

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