rnmp / salvattore

A jQuery Masonry alternative with CSS-driven configuration.
https://salvattore.js.org/
MIT License
2.17k stars 243 forks source link

Layout issues when re-initializing in Internet Explorer 9/10 #181

Closed jmcmorri-mw closed 8 years ago

jmcmorri-mw commented 8 years ago

Hello, I am using salvattore to create a 3 column grid, I also have filters to show and hide elements within the grid and I am re-initializing the grid after filtering so that the columns remain equal. Currently I am doing this by firing off salvattore.rescanMediaQueries(); after a filter has been clicked. This seems to be working fine in most browsers, but in IE9 and 10(IE11 and Edge work as expected) all of the elements end up being appended to the first column and the other 2 columns are just empty.

I have also tried the recreateColumns function by adding this to the end of the filter click function:

var grid = document.querySelector('#columns');
salvattore.recreateColumns(grid);

But that had the same result as using rescanMediaQueries. Any ideas on how to resolve this?

jmcmorri-mw commented 8 years ago

I also just noticed that it happens on resize as well. I have it set up so that the grid is 1 column for mobile and 3 columns for desktop and if I resize my window to the mobile breakpoint and then go back to the desktop breakpoint all of the elements remain in the first column.

jmcmorri-mw commented 8 years ago

Realized this issue is specific to an unofficial branch which balances the columns