Skip to content
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

[Feature]: improve hover and touch interactions #31858

Open
1 task done
mainframev opened this issue Jun 28, 2024 · 2 comments
Open
1 task done

[Feature]: improve hover and touch interactions #31858

mainframev opened this issue Jun 28, 2024 · 2 comments

Comments

@mainframev
Copy link
Contributor

mainframev commented Jun 28, 2024

Library

React Components / v9 (@fluentui/react-components)

Describe the feature that you would like added

The issue of inconsistent hover behavior across different devices was reported in issue #30388 and touched in #5882.

The challenge arises because the hover effect, designed primarily for mouse interactions, does not translate well to touch devices. Users on touch devices cannot hover over elements without initiating a touch, leading to the "sticky" behavior described in these issues.

The CSS approach involving the any-hover or hover media query, as implemented in #31700 is insufficient for our needs. This is particularly problematic for devices that support multiple input modes. For example, Windows laptops with touchscreens or iPadOS 13.4 and later, allow users to switch between touch and pointer-based interactions seamlessly. The any-hover media query cannot dynamically adapt to these changes.

To address this issue comprehensively, we should probably lean towards JS-based approach, something similar to the one used in React Spectrum.

It relates to all components with hover effects. I labeled it with vNext (hope it's the correct label).

Please feel free to share any comments or suggestions 🙂

Have you discussed this feature with our team

The problem was discussed on the regular tech sync

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Priority

None

@smhigley
Copy link
Contributor

@mainframev are you OK with me assigning this to you for future tracking?

@mainframev
Copy link
Contributor Author

@smhigley yes 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants