You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that iPad Pro devices are considered Macintosh since they are running on iPadOS. I've been using this module and it worked fine, but still had the issue on iPad. I've fixed it by detecting iPads this way:
...and just updated the code within ios-inner-height where it would skip and return window.innerHeight if the userAgent does not matches /iphone|ipod|ipad/i:
// Non-iOS browsers return window.innerHeight per usual.// No caching here since browsers can be resized, and setting// up resize-triggered cache invalidation is not in scope./* istanbul ignore if */if(!navigator.userAgent.match(/iphone|ipod|ipad/i)&&!isIpad()){/** * Avoids conditional logic in the implementation * @return {number} - window's innerHeight measurement in pixels */returnfunction(){returnwindow.innerHeight}}
I am not sure if I should have created a PR as I'm not sure you want to include that isIpad() function in this module, but it might help if someone is having the same issue as I did... You might have a better solution/fix for including iPadOS for this module.
The text was updated successfully, but these errors were encountered:
Hey there, super useful module!
I've noticed that iPad Pro devices are considered Macintosh since they are running on iPadOS. I've been using this module and it worked fine, but still had the issue on iPad. I've fixed it by detecting iPads this way:
...and just updated the code within ios-inner-height where it would skip and return
window.innerHeight
if the userAgent does not matches/iphone|ipod|ipad/i
:I am not sure if I should have created a PR as I'm not sure you want to include that isIpad() function in this module, but it might help if someone is having the same issue as I did... You might have a better solution/fix for including iPadOS for this module.
The text was updated successfully, but these errors were encountered: