Articles are sorted incorrectly
I think forking a test case makes no sense with my problem, cause I really have no idea how I can imitate the error in such a case. I've made a short screen videos to show what happens. Perhaps anybody know this problem and can show me the right direction to fix it..
In my case I use masonry.js together with imagesLoaded to adjust a WordPress blogroll. I wanna sort the articles from the output and it works good so far. But there is a single blogpost that is not properly arranged. That leads to a bigger gutter on top. Any idea?
I tried it with the version that is delivered with WordPress itself and also with the newest release. With both I get the same result.
Thanks for reporting this issue. I appreciate the video, but a live URL is necessary in order to understand the issue. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.
It is a really complex thing.. Is it helpful for you to share the url itself? It's on a development domain. If you send me your ip, I can whitelist you and share the link. All scripts are uncompressed there.
Sorry, but a reduced test case is best way to identify the issue at hand. If you can reproduce the issue in an isolated example I can take a look.
As I mentioned before. It is not reproducible. Works fine in the "test-scenario" that is linked below. But it breaks in the live version.
It seems that it was something like a loading conflict. It was possible to fix it with a setTimeout:
this.grid.imagesLoaded( function()
{
setTimeout(function()
{
$this.masonry();
}, 100 );
});