-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ScrollTrigger plugin throws warning "Consider marking event handler as 'passive' to make the page more responsive." #460
Comments
Sure, we can do that in the next release. Thanks for the suggestion. And just to be clear, that's not an "error" - it's just a warning :) |
@jackdoyle Thanx for heads up and next release update! I have updated issue accordingly. |
- IMPROVED: made the "wheel" event listener passive in ScrollTrigger. See #460 - IMPROVED: made it possible to use CustomEase without loading GSAP. - IMPROVED: function-based inertia "end" values now receive the velocity as the 2nd parameter which makes it much easier to do directional snapping - IMPROVED: if you alter the repeatDelay() after the animation has already started, it maintains the playhead's local position as long as the parent timeline has smoothChildTiming enabled. - FIXED: if you call .update() with the "sticky" parameter true while dragging after the element has been changed in the document flow (repositioned), it may render at the incorrect position. - FIXED: if you kill() a ScrollTrigger instance, the previous scroll position may still be remembered. So, for example, in a SPA that goes to a new page and kills all the ScrollTriggers, it may still keep the scroll position instead of going back to the top/left. See https://greensock.com/forums/topic/28592-scrolltrigger-and-nextjs-scroll-position-after-route-change/ and https://greensock.com/forums/topic/28575-scrolltrigger-issue-with-scroll-position-when-i-navigate-to-a-page/ - FIXED: if ScrollTrigger.update() was called during a ScrollTrigger.refresh(), it could cause pinned elements not to be positioned correctly. See https://greensock.com/forums/topic/28547-having-an-issue-with-scrolltrigger-locomotive-scroll/ - FIXED: worked around a Firefox bug that could throw an error if you tried to Flip a root <svg> element. Firefox reports getCTM() as null on <svg> elements. - FIXED: improved Flip plugin's ability to correctly size root <svg> elements - FIXED: regression in 3.7.0 caused a tween's onStart callback to be called twice. See https://greensock.com/forums/topic/28644-370-onstart-in-fromto-fires-twice/ - FIXED: if you define a "snap" value for ScrollTrigger as an Array in the shorthand syntax, like snap: [0, 0.1, 0.7, 1] instead of snap: {snapTo: [0, 0.1, 0.7, 1]}, it didn't work properly. - FIXED: if you resume a tween whose playhead is at the VERY end, it could render one last time unnecessarily, calling the onComplete when it really shouldn't because the playhead didn't move. - FIXED: regression in GSDevTools.create() caused it not to display all animations with "id" properties in the drop-down list. See https://greensock.com/forums/topic/28706-gsdevtools-animation-ids-not-working/ - FIXED: an edge case could cause MotionPathPlugin could use a large amount of memory. See https://greensock.com/forums/topic/28744-multiple-gsap-motion-path-traces-on-the-same-timeline-simultaneously/
@jackdoyle I am still getting this issue using the Could you please push that fix in the full gsap bundle? Here's a couple of screenshot that can help locate the missing Thanks a lot, cheers! |
Yep, that has been in the gsap-bonus.tgz for a while. I wonder if you've got a cached version? Are you positive it says version 3.9.1 at the top of the ScrollTrigger file? |
@jackdoyle Damn you're right, I was stuck at 3.6.0 XD sorry about that. Thanks for that quick answer :) cheers! |
I am using gsap with ScrollTrigger plugin with React application. Since scroll trigger event listeners does not use
passive: true
on event subscription, Chrome version Version 91.0.4472.101 throws following warning on Verbose mode enabled.[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive
Here is usage:
Here is the suggested usage that resolves warning:
The text was updated successfully, but these errors were encountered: