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

Make tooltips more touchscreen-friendly #272

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Make tooltips more touchscreen-friendly #272

merged 1 commit into from
Nov 11, 2024

Conversation

robintown
Copy link
Member

The current behavior on touchscreens is that tooltips will open as soon as you touch the trigger and remain open indefinitely due to focus and simulated hover. This feels unexpected, particularly on mobile.

The solution implemented here is to ignore non-visible focus and simulated hover events, and instead allow tooltips to be opened by long-pressing on the trigger. This matches the behavior of native tooltips on Android (though I don't know whether iOS has this same interaction pattern).

The current behavior on touchscreens is that tooltips will open as soon as you touch the trigger and remain open indefinitely due to focus and simulated hover. This feels unexpected, particularly on mobile.

The solution implemented here is to ignore non-visible focus and simulated hover events, and instead allow tooltips to be opened by long-pressing on the trigger. This matches the behavior of native tooltips on Android (though I don't know whether iOS has this same interaction pattern).
@robintown robintown requested a review from a team as a code owner November 8, 2024 21:26
@robintown robintown requested review from t3chguy and removed request for a team November 8, 2024 21:26
Copy link

Deploying compound-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b0ec47
Status: ✅  Deploy successful!
Preview URL: https://e7c5febb.compound-web.pages.dev
Branch Preview URL: https://mobile-tooltips.compound-web.pages.dev

View logs

@robintown robintown merged commit ad0ee71 into main Nov 11, 2024
6 checks passed
robintown added a commit to robintown/element-call that referenced this pull request Nov 11, 2024
hughns pushed a commit to element-hq/element-call that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants