Permalink
Browse files

Merge pull request #430 from hfrntt/patch-1

Improved touch detection, now it works on Firefox for Android devices.
  • Loading branch information...
paulirish committed Dec 7, 2011
2 parents 9ff083d + 53c907f commit 38ef180d8680c38a03577603338e55578d63d59c
Showing with 1 addition and 1 deletion.
  1. +1 −1 modernizr.js
View
@@ -274,7 +274,7 @@ window.Modernizr = (function( window, document, undefined ) {
hash[children[len].id] = children[len];
}
- /*>>touch*/ Modernizr['touch'] = ('ontouchstart' in window) || (hash['touch'] && hash['touch'].offsetTop) === 9; /*>>touch*/
+ /*>>touch*/ Modernizr['touch'] = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch || (hash['touch'] && hash['touch'].offsetTop) === 9; /*>>touch*/
/*>>csstransforms3d*/ Modernizr['csstransforms3d'] = (hash['csstransforms3d'] && hash['csstransforms3d'].offsetLeft) === 9; /*>>csstransforms3d*/
/*>>generatedcontent*/Modernizr['generatedcontent'] = (hash['generatedcontent'] && hash['generatedcontent'].offsetHeight) >= 1; /*>>generatedcontent*/
/*>>fontface*/ Modernizr['fontface'] = /src/i.test(cssText) &&

0 comments on commit 38ef180

Please sign in to comment.