question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Masonry] error when replacing content

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

I have a masonry layout with some skeletons inside (while fetching some data) and when the data is fetched and it needs to update the content, I get this error: Masonry.js:193 Uncaught TypeError: Cannot read properties of null (reading 'contentRect') at ResizeObserver.handleResize

Steps to reproduce 🕹

I’ve created a sandbox: https://codesandbox.io/s/material-masonry-bozr2

The error might not appear on the first render. Some page reload might be needed.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hbjORbjcommented, Jan 14, 2022

@snehaelsaalex @mihaibogdan

Hi. I would like to let you know that the fix is likely to be merged in the upcoming release, which is on this Monday 😃

2reactions
snehaelsaalexcommented, Jan 12, 2022

I have got the same issue. @hbjORbj i tried using your fix and it works perfectly, also the issue with more than 2 columns appearing when 2 columns are specified is also resolved. If the review of the PR is completed, kindly merge.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Masonry] error when replacing content · Issue #30453 - GitHub
hi. When I try to expand an item in masonry component,it comes out of the container and gets messed up.
Read more >
jQuery masonry initializes failing on subsequent calls
1 Answer 1 ... If you are just replacing the contents of the container, as opposed to the container itself, you will have...
Read more >
Masonry Error | WordPress.org
Hi @overthewallplanet,. It looks like the error is in the Zilla Likes plugin, which is no longer being supported. I'd recommend you to...
Read more >
Masonry Grid Overlaps, works fine after resizing browser ...
In this case, the overlap happens on simple text-based posts. Strangely, after resizing the browser window, there are no issues.
Read more >
Problem with Masonry - Support - Premium WordPress Themes
Tagged: array, avia, fatal error, masonry, posts, ... file in the child theme of the staging site and replace the one in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found