scottjehl/Respond

IE8 matchmedia always returns false

Closed this issue · 2 comments

I am finding that matchmedia([query]).matches always returns false in IE8.

My understanding was that respond.js has matchmedia polyfill included therefore enabling IE8 to interpret JS matchmedia?

Here is a fiddle: http://jsfiddle.net/iamkeir/hxao73zy/
View in IE8: https://jsfiddle.net/iamkeir/hxao73zy/embedded/result/

Correction - if you do a screen media query, it will return true, but any width-based query is always false.

My bad - I see that matchmedia polyfills IE9 only. A patch for matchmedia is required (paulirish/matchMedia.js#13) or deeper support from https://github.com/weblinc/media-match