-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[base-ui][joy-ui] Hover styles persist after clicking on an element on mobile #36583
Comments
@danilo-leal @siriwatknp does this expected UX makes sense? It's based on how native apps behave. On the web, it's very common for websites to leave an artifact hover style after an interaction, my thought was that native apps usually set the tone for what a great UX is, so I thought that we should probably copy it. If yes, I think that it's something we can/should delegate to the community, waiting for someone to care enough to spend time on it. |
I'm not 100% sure if you're asking if there should be a hover state on mobile but that's what I'm understanding 😬 Well, I guess hover technically "doesn't exist" on mobile as you can't just hover something, you either touch something or not. However, just quickly checked 3 very high-quality apps here, all native as far as I know, and they all react to a long-press interaction, which is sort of, to me, in between the hover and active states. So, in the end, yeah, they should probably react somehow and not be purely static. Airbnbairbnb.mp4GitHubgithub.mp4Uberuber.mp4 |
@danilo-leal Right, to be clear, my concern is with the UI state that persists after the interaction. I have to touch on a dead area to find the normal UI state. All your recordings seems to (it's hard to see where the touch happen) behave as I would expect, categorized under "OK". |
Ah, I see. Agree with you ⎯ it looks correct to me not to persist the state post-touch, which would be equivalent to not persisting the state post-click. In other words, the hover/active-like style difference would be triggered while you're actively touching and be gone the moment you lift the touch interaction up. 👍 |
@oliviertassinari I would like to pick this up |
I'm reopening, the issue is still present on Base UI: https://mui.com/base/react-button/ |
@oliviertassinari I'll be pushing a fix for this shortly. Sorry for not catching this. |
@gitstart no problems. Note that it's not specific to the button, this bug can be reproduced on many other pages of the docs. The first page I tried reproduced the bug: https://mui.com/joy-ui/react-checkbox/. |
More context on the issue, faced in MUI X too mui/mui-x#10039. It seems that we can use GitHub tradeoffs for Base UI, Joy UI, Material UI: mui/mui-x#10039 (comment) |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
Steps:
&:hover
styleCurrent behavior 😯
KO, Joy UI
Screen.Recording.2023-03-20.at.11.46.17.mov
KO, Base UI
Screen.Recording.2023-03-20.at.11.39.12.mov
Expected behavior 🤔
OK on Material UI, however there is a limit, it's broken on all Samsung phones: #15000 (comment)
Screen.Recording.2023-03-20.at.11.39.46.mov
Context 🔦
#15000
Your environment 🌎
MUI Core v5.11.13
The text was updated successfully, but these errors were encountered: