[Bug]: We need a way to disable hover state for all spectrum buttons on mobile devices
See original GitHub issueCode of conduct
- I agree to follow this project’s code of conduct.
Impacted component(s)
ProjectX
Expected behavior
There’s a lingering hover effect on the mobile browser with button-related components such as sp-menu-item
, sp-action-button
, and sp-button
; this is causing confusion for users.
Actual behavior
SWC should have a way to detect on mobile devices and disabled the hover effects
Screenshots
https://user-images.githubusercontent.com/4380525/191066654-0b550d62-9ba3-4688-a2dd-c7c7f72e2d03.MP4
What browsers are you seeing the problem in?
Safari
How can we reproduce this issue?
- Go to ProjectX
- Click on Plus menu
- Scroll to through the list of menu items
- Observe there are some items with linger hover states
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
How to prevent sticky hover effects for buttons on touch devices
You can remove the hover state by temporarily removing the link from the DOM. ... We do not want to detect the presence...
Read more >How do I disable hover styles on mobile? #1739 - GitHub
Best way is to use media query to detect if a device supports hover and only disable it if it does not. This...
Read more >Building a Button Part 2: Hover Interactions
In the first post, we covered how React Spectrum and React Aria implement ... a hover state for a component is the :hover...
Read more >Dealing with hover on mobile - YouTube
We can't hover on mobile devices, so what can we do about hover animations and other things that we might need to have...
Read more >Accessibility and usability considerations for disabling buttons ...
We could add a hover-based tooltip to the disabled button. This isn't ideal though. Since the button doesn't focus, sighted keyboard users won't ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Westbrook is there a way to track that upstream issue?
You can track here: https://jira.corp.adobe.com/projects/CSS/issues/CSS-289
We’ll be discussing https://github.com/saulhardman/postcss-hover-media-feature after the holidays and whether/were’s the right place to inject that in the overall Spectrum universe.