Closed almothafar closed 5 years ago
Hi there,
Thanks for the issue! I am going to close this since this is a known issue.
Fixing this would require breaking changes, so I created a feature request here: https://github.com/ionic-team/ionic/issues/17631.
Thanks for using Ionic!
@liamdebeasi but if this is an issue, then you should fix it or provide some other API that returns with the correct result, adding different classes!
Hi there,
Like I mentioned previously, properly fixing this would require breaking changes, and we only do breaking changes with major releases (4.0, 5.0, 6.0, etc). The feature request I created is something that will be considered for the next major release of Ionic.
We aren't ignoring your issue, I am just letting you know that since it requires a breaking change we can't implement a fix right at this moment 🙂
Thanks!
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.
Bug Report
Ionic version: [x] 4.x
Current behavior: I use the ionic project as a web and mobile app, so I have to handle big screens and desktop version using
Platforms
when I open the website in some devices, especially remotely, I get everything messed up, because it is got the mobile version running on the desktop one, after 3 days of troubleshooting, I found that the issues related to Ionic, as first I thought it could be cleint-side only issues.Currently, I get the classes
plt-mobile plt-mobileweb
applied to the<html>
tag, and callingwindow.Ionic.platfroms
returns withmobile
andmobileweb
:Expected behavior: The desktop should be desktop, and detect the device correctly, as what they do in all website in the world and this http://detectmobilebrowsers.com/
Steps to reproduce: I can't provide the correct way, as it depends on some clients, but I found that I can get the issue if I open the website using remote desktop, I'm not sure how to reproduce it, in work machines everything is fine, on my home machine, and client machine, the issues happen.
Related code: I think this is related to this part for code: https://github.com/ionic-team/ionic/blob/master/core/src/utils/platform.ts#L68
It is totally wrong, see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/any-pointer
Ionic info: