Open matthewenks opened 7 years ago
Guessing it should be: var iOSversion = userAgent.match(/OS (\d+)/);
makes sense. do you want to send a PR for this?
As an aside, should like 48 read like this?
that effectively limits the buggyfill to iOS 7. I'm not sure it's still required in iOS 10
I'm not sure either actually - from what I've experienced viewport units work, albeit in an Apple-prescribed way. vh units will always take the maximum height of the viewport (ie. with the address bar hidden), rather than the current available height.
I've not contributed to open source before - I'll have a look into creating a PR shortly :)
FYI - the iOS version matching was fixed in https://github.com/rodneyrehm/viewport-units-buggyfill/pull/85.
viewport-units-buggyfill.js
Line 45 was: var iOSversion = userAgent.match(/OS (\d)/);
Guessing it should be: var iOSversion = userAgent.match(/OS (\d+)/);
As an aside, should like 48 read like this?
return iOSversion && iOSversion.length>1 && parseInt(iOSversion[1], 10) < 8;