rodneyrehm / viewport-units-buggyfill

Making viewport units (vh|vw|vmin|vmax) work properly in Mobile Safari.
MIT License
1.59k stars 151 forks source link

New check for IE10 won't work #68

Closed ckaemper closed 8 years ago

ckaemper commented 8 years ago

The below code from 985b9a6 seems not to work for IE 10 since the revision token ("rv") was introduced with IE 11 (see here).

  // added check for IE10, IE11 and Edge < 20, since it *still* doesn't understand vmax
  // http://caniuse.com/#feat=viewport-units
  if (!isBuggyIE) {
    isBuggyIE = !!navigator.userAgent.match(/Trident.*rv[ :]*1[01]\.| Edge\/1\d\./);
  }

Something like this may work, though not very pretty.

isBuggyIE = !!navigator.userAgent.match(/MSIE 10\.|Trident.*rv[ :]*1[01]\.| Edge\/1\d\./);
rodneyrehm commented 8 years ago

do you want to send a PR for that?

ckaemper commented 8 years ago

Sure, I'll send a PR.