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

Mouse follower cursor appear on Mobile and Tablet Device #28

Open
manashjyotix opened this issue Mar 29, 2023 · 1 comment
Open

Mouse follower cursor appear on Mobile and Tablet Device #28

manashjyotix opened this issue Mar 29, 2023 · 1 comment

Comments

@manashjyotix
Copy link

When I use mouse follower it's working fine on desktop but when I double press on mobile and tablet device it shows the mouse cursor dot. It's annoying. I tried everything I can do but didn't work and I also tried the 2 method.

1st one : if (window.matchMedia('(pointer:fine)').matches) {
const cursor = new MouseFollower();
}

2nd one : .mf-cursor {
@media screen and (max-width: 769px) {
display: none;
}
}

Please help me to fix this issue, thank you

@VladLujerdeanu
Copy link

VladLujerdeanu commented Oct 30, 2023

I followed this medium article and it seems to work fine.
The solution:

.mf-cursor {
  ...
  @media (hover: hover) {
    display: block;
  }

  @media (hover: none) {
    display: none;
  }
 ...

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

No branches or pull requests

2 participants