Jump to content
GreenSock

rfoost

scrollTo onAutoKill does not trigger when clicking up or down buttons on scrollbar

Recommended Posts

I've noticed that by clicking on the up or down arrow buttons on the scrollbar during a scrollTo tween, the onAutoKill function does not activate or stop the tween. How can this be changed to do so?

See the Pen MOKmxG by rfoost (@rfoost) on CodePen

Link to comment
Share on other sites

First of all, welcome to the forums.

 

Hm, what browser and OS? The alert() actually stops execution, so if you get rid of that it worked fine for me. Oh, and there was a typo in your codepen that threw an error (an extra "." at the end). 

 

There's a threshold in terms of how much it'll let things scroll outside ScrollToPlugin's control before it kills things, so maybe you're running into a situation that's below that threshold. That threshold was critical to work around some bugs in Apple browsers. 

  • Like 2
Link to comment
Share on other sites

Operation System is Windows 10.

Browser is Chrome.

 

I changed the alert to console.log and I removed that extra line in the javascript. Even after the changes you can see that once the scroll begins, the clicking of the up or down scrollbar buttons does not stop the tween or activate the onAutoKill function. It seems the only way to prompt the autokill is to select the scrubber and drag it either up or down.

Link to comment
Share on other sites

Hello @rfoost and Welcome to the GreenSock Forum!

 

I just tested your codepen in Windows 10 on latest Chrome 62 - Version 62.0.3202.75 (Official Build) (64-bit).

 

And when I clicked the scrollbar up or down arrow, the onAutoKill triggered like expected with the console log displaying autoKill.

 

:)

  • Like 1
Link to comment
Share on other sites

Interesting, I just updated chrome to version 62.0.3202.75

 

Still I can't seem to get an autokill response without grabbing the scrubber.

Link to comment
Share on other sites

I'm seeing the same problem as @rfoost in all browsers on Window 10 Home, Version 1709, OS Build 16299.19

 

 

Link to comment
Share on other sites

When I tested this I was on Windows 10 Professional and could not reproduce the above issue. 

 

I wonder if this is only affecting Windows 10 Home Edition?

Link to comment
Share on other sites

Maybe it has to do with the autoKillThreshold. It's set at 7, but setting it to a really low number seems to kill it most of the time. Not sure what a good number would be. Maybe @GreenSock can advise on that.

 

ScrollToPlugin.autoKillThreshold = 0.1;

 

Link to comment
Share on other sites

15 minutes ago, Jonathan said:

When I tested this I was on Windows 10 Professional and could not reproduce the above issue. 

 

I wonder if this is only affecting Windows 10 Home Edition?

 

I'm wondering if it might be affected by the scroll by lines value in Windows mouse settings. Mine is set to scroll 3 lines, what is yours set to?

  • Like 1
Link to comment
Share on other sites

@OSUblake mine is also set to 3 lines at a time. 

 

I have noticed other weird differences with weird behavior in functionality in Win 10 Pro vs Home. But it is Microsoft, so who knows what type of gremlins they have running around in their OS :(

 

  • Does anyone else see this same behavior on Chrome 62, Win 10 Home or Pro?
  • Like 2
Link to comment
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.
×