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
{{ message }}
Repository navigation
this.platform.is('tablet') not working properly #15434
This is at best just a good guess and therefor not 100% reliable. I would suggest to use other methods in addition to make your detection code a bit more full proof, for example user agent checks or modernizr.
I had a similar issue where iPad Pro 12.9" was returning false for platform.is('tablet') because its so large in res it was showing as a desktop so I beefed up my check to also check with platform.is('ipad') etc.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
yuankunluo commentedon Sep 2, 2018
The platforms are: Android,iOS, windows, browser, windowsphone
smxdevst commentedon Sep 2, 2018
@yuankunluo
https://ionicframework.com/docs/api/platform/Platform/
daem0ndev commentedon Jan 19, 2019
@smxdevst in looking at the source its simply because the check for
tabletis just checking to see if the viewport size is within a certain range:source: https://github.com/ionic-team/ionic/blob/master/core/src/utils/platform.ts#L70-L77
This is at best just a good guess and therefor not 100% reliable. I would suggest to use other methods in addition to make your detection code a bit more full proof, for example user agent checks or modernizr.
I had a similar issue where iPad Pro 12.9" was returning false for
platform.is('tablet')because its so large in res it was showing as adesktopso I beefed up my check to also check withplatform.is('ipad')etc.daem0ndev commentedon Jan 19, 2019
Here’s another resource I found for detecting pixel 2 xl: https://stackoverflow.com/questions/49078882/media-query-to-differentiate-google-pixel-1-2-vs-google-pixel-xl-vs-google-pixel
liamdebeasi commentedon Mar 15, 2019
Hi there,
This issue has been resolved via #17630 and will be in the next release of Ionic.
Thanks for the issue!
ionitron-bot commentedon Apr 14, 2019
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.