masonic icon indicating copy to clipboard operation
masonic copied to clipboard

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

Open mmmulani opened this issue 3 years ago • 3 comments

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: https://github.com/whatwg/html/issues/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.

mmmulani avatar May 02 '22 23:05 mmmulani

Yes, even the images reload on the sandbox.

Doaa-Ismael avatar Jul 18 '22 11:07 Doaa-Ismael

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

epurban avatar Dec 13 '22 19:12 epurban

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

jaredLunde avatar Dec 15 '22 02:12 jaredLunde