Skip to content

Commit

Permalink
fix(ie-support): fix back to top component in IE9
Browse files Browse the repository at this point in the history
- Uses Modernizr.mq instead of window.matchMedia
- Modernizr.mq has IE9 support, where as window.matchMedia does not

[Finishes #84119472]

Signed-off-by: Bebe Peng <bpeng@pivotal.io>
  • Loading branch information
Geoff Pleiss committed Jan 5, 2015
1 parent bfbb966 commit ade9688
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pivotal-ui/javascripts/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

var Modernizr = require('modernizr');

var breakpoints = {
xsMin: 480,
smMin: 768,
Expand Down Expand Up @@ -31,5 +33,5 @@ module.exports = window.utils = {
};

function isMinWidth(width) {
return window.matchMedia('(min-width: ' + width + 'px)').matches;
return Modernizr.mq('(min-width: ' + width + 'px)');
}

0 comments on commit ade9688

Please sign in to comment.