Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Jeanlat

Mouse cursor animation frozen on scroll

Recommended Posts

Hello ! 
I use this resource and it works pretty good but the hover animation freezes on scroll.

Any Idea to solve this ? 

See the Pen GRZQqOO by Jeanlat (@Jeanlat) on CodePen

Link to post
Share on other sites

Hey Jeanlat and welcome to the GreenSock forums.

 

Mouse events are purposefully suppressed by most browsers when the user is scrolling. Otherwise you'd have a lot of events firing for elements that usually aren't meant to be hovered. I would likely reverse the animation on scroll.

Link to post
Share on other sites

Thank you for your answer !

I understand, isn't it possible to force specific mouse event ?

Link to post
Share on other sites

I seem to remember another thread that asked that question but I can't seem to find it right now. Maybe someone else can step in and link to it.

 

IIRC, it's possible but not the most performant to do so (you'd have to calculate elementsFromPoint for each tick of the scroll and manually fire any event listeners for those elements). As I said before I recommend just reversing the animation on scroll.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×