-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pickers] Some mobile phones render desktop pickers (i.e. Google Pixel 7) #10039
Comments
I was able to fix this using the A fix is to replace the default media query |
For the sake of linking to the history of this logic: mui/material-ui-pickers#1653 (comment) & mui/material-ui#15000.
If this works, it would pretty be the same as mui/material-ui#15000 (comment), then I think we could apply the same logic everywhere. I have a similar issue on Material UI buttons with my Samsung phone, I see the hover style, it's annoying. |
Something I found randomly, looking for something else: GitHub is using: '@media (hover: hover) and (pointer: fine)': { |
Thank you for pointing out this resource, it had confirmed the direction that it makes sense updating the rule to be more strict and reduce the false-positives that we currently encounter due to device reporting differences. 👌 |
A deeper dive https://hoverpointer-media-query.glitch.me, using BrowserStack:
|
This looks to be a somewhat common problem among many devices and/or browsers.
Technically, IMHO, it's not our concern to come up with hacky solutions to fix such problems and the proposed solution in PR could backfire on us in certain scenarios that we are not aware of yet. Maybe just adding a documentation section about these edge cases would be a good trade-off? 🤔 I'm putting the issue up for grooming. |
@LukasTy Tricky. In the case of the hover style, I think that However, in the case of flipping between the mobile and desktop variants, it feels better to:
|
@oliviertassinari Below are replies to your points:
I'm pretty sure that desktop pickers do not have problems working on mobile. 🤔
That is already pretty easy to do with desktopModeMediaQuery prop. 👍 TL/DR: My gut tells me that we should not change anything regarding the out of the box behavior to cater to buggy implementations, because we'd eventually arrive to the age-old WDYT about adding more information in the relevant documentation page and mentioning it in the callouts in addition to the already mentioned testing responsiveness case? |
Kendo jQuery success was partially based on browser interoperability that used to be a mess.
|
That is a good point. Especially if we would be adding this information to the doc, then refactoring this section could make sense.
Good point, at this point and the current structure of the docs, the callout is probably redundant, we could aim at making the information on the main page as discoverable as possible. 👍
Good point, but I tried searching for |
We decided to go with improving the existing responsive callouts by relocating them to either a more visible section in https://mui.com/x/react-date-pickers/base-concepts or even a new page (Limitations) as suggested. We'd be extending the mentioned section/page with the information about possible issues on certain devices just like this one, preferably linking to most relevant issue(s). |
Steps to reproduce 🕹
Link to live example:
Steps:
This appears to be due to Google Pixel 7 phones returning true to the pointer: fine media query when all other phones return false.
See this PR on another package for more information ionic-team/ionic-framework#26240
Current behavior 😯
On Google Pixel 7 phones, the desktop version of the date and time pickers are displayed.
Expected behavior 🤔
On Google Pixel 7 phones, the mobile version of the date and time pickers should be displayed, in line with how other phones display the date and time pickers.
Context 🔦
I am unable to properly provide the mui date and time picker mobile interface to Google Pixel 7 users
Your environment 🌎
npx @mui/envinfo
Running the latest update to Google Chrome on the Google Pixel 7
The text was updated successfully, but these errors were encountered: