mirror of
https://github.com/Modernizr/Modernizr.git
synced 2026-01-10 16:18:00 -05:00
Merge pull request #886 from mikkotikkanen/testMediaQuery
Modernizr crashes on Firefox with hidden iframe
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ build
|
||||
dist
|
||||
tmp
|
||||
.DS_Store
|
||||
.project
|
||||
|
||||
@@ -6,7 +6,7 @@ define(['injectElementWithStyles'], function( injectElementWithStyles ) {
|
||||
var matchMedia = window.matchMedia || window.msMatchMedia;
|
||||
var bool;
|
||||
if ( matchMedia ) {
|
||||
return matchMedia(mq).matches;
|
||||
return matchMedia(mq) && matchMedia(mq).matches || false;
|
||||
}
|
||||
|
||||
injectElementWithStyles('@media ' + mq + ' { #modernizr { position: absolute; } }', function( node ) {
|
||||
|
||||
Reference in New Issue
Block a user