jquery-match-height icon indicating copy to clipboard operation
jquery-match-height copied to clipboard

incompatibility with IE8 and media queries.

Open youg009 opened this issue 10 years ago • 1 comments

Hi, I use this plugin to assign the same height to a group of blocks, the whole being responsive. Everything works fine except on IE8. After a few tests, I realize that the matchHeight plugin fails to calculate the height of my elements when their css properties are in a media queries. In fact, if I delete the media queries, the plugin works well.

Here is the zip with all the test files : https://dl.dropboxusercontent.com/u/92785077/bug%20matchHeight.zip

How to fix it ? Thank you.

youg009 avatar Aug 22 '14 20:08 youg009

I'm going to guess this is because matchHeight is updating before the respond.js plugin has updated the layout?

I don't have time right now to try this, but here's my guess on a hack to solve that:

if (respond && !respond.mediaQueriesSupported) {
    var delayedUpdate = function() {
        setTimeout($.fn.matchHeight._update, 100);
    };

    $(delayedUpdate);
    $(window).bind('load resize orientationchange', delayedUpdate);
}

So, this hopefully will fire an update after respond has done its work on the layout.

liabru avatar Aug 31 '14 20:08 liabru