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

fix: Disable hover on devices that don't support it #837

Merged
merged 1 commit into from Dec 5, 2023

Conversation

ChaituVR
Copy link
Member

@ChaituVR ChaituVR commented Dec 5, 2023

Closes #755

Summary

Fix is related to tailwindlabs/tailwindcss#8394

Again this will be a breaking change in v4, but only for evil people who were writing code like hidden group-hover:block. Until then, everything will work the same, and you can opt-in to this if you want to start using it now.

So the problem is with the group-hover class and IOS devices don't support hover events, on the first click it assumes as hover

This change will disables on mobile devices but hovers should still work on desktops
An alternate way is to handle click with JS

How to test

  1. Open the explore page on IOS Safari
  2. Click on any space
  3. Before fix: It will take two clicks to go to space page
  4. After fix: It will take one click to go to space page
  5. Also try same on desktops, it should display a star on hover and redirect to space page on click

Self-review checklist

  • I have performed a full self-review of my changes
  • Tested on IOS safari
  • Tested on desktop chrome
  • Test on Android chrome
  • I have tested my changes on a preview deployment
  • I have tested my changes on different screen sizes (sm, md)

@ChaituVR ChaituVR requested a review from Sekhmet December 5, 2023 10:26
@Sekhmet
Copy link
Member

Sekhmet commented Dec 5, 2023

only for evil people who were writing code like hidden group-hover:block

image

Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@ChaituVR ChaituVR merged commit 2e1ae4d into master Dec 5, 2023
1 check passed
@ChaituVR ChaituVR deleted the fix-disable-hovers branch December 5, 2023 10:52
Sekhmet pushed a commit to snapshot-labs/sx-monorepo that referenced this pull request Feb 6, 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.

bug: clicking on SpaceItem doesn't open Space on first click on iOS Safari
2 participants