[Snyk] Upgrade gsap from 3.9.0 to 3.11.3 #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade gsap from 3.9.0 to 3.11.3.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: gsap
IMPROVED: if you use ScrollTrigger to pin something inside a pinnedContainer (and both have pinSpacing), it'll now adjust the padding/sizing of that pinnedContainer's pin-container element. So nested pinning has better support now.
IMPROVED: Previously, MotionPathHelper would only set the pathColor, pathWidth, and opacity if the path that was defined wasn't an svg (if it created a new one), but now it'll honor those properties even if you're using an existing path. See https://greensock.com/forums/topic/34009-arguments-in-the-motionpathhelper-function-are-ignored/
IMPROVED: added a console.warn() for when you forget to define a "content" element for a ScrollSmoother.
IMPROVED: MotionPathHelper is gsap.context()-aware and has a kill() method for better management.
FIXED: regression in 3.11.2 that could cause a .fromTo() tween to render its starting values immediately after .revert() is called. See https://greensock.com/forums/topic/34016-fromto-not-reverting-inline-styles-as-expected/
FIXED: if you set a pin value in a ScrollTrigger and fail to set any pinSpacing (true or false) and the pin element's parentNode is NOT a valid Element, it could throw an error. See https://greensock.com/forums/topic/34021-pinned-element-using-scrolltrigger-breaking-the-flow-on-litdev-app-error-failed-to-execute-getcomputedstyle-on-window-parameter-1-is-not-of-type-element
FIXED: if ScrollTrigger.refresh() is called when a ScrollTrigger is pinned and the scroll position is not at the very top/left, it could render that pinned element incorrectly.
FIXED: When calling ScrollTrigger.refresh(), it may (in certain circumstances) cause ScrollSmoother to jump to the top. See https://greensock.com/forums/topic/33877-scrollsmoother-scrolling-to-top-with-scrolltriggerrefresh/
FIXED: if you enable snapping on a ScrollTrigger and have scroll-behavior: smooth on the scroller, it may not settle properly. 3.11.3 sets scroll-behavior to auto automatically in that condition now.
FIXED: if you call setPositions() on a ScrollTrigger that pins and has pinSpacing, it'll adjust the pin spacer's height/padding accordingly rather than just changing the start/end.
FIXED: in 3.10.0, ScrollTrigger switched to waiting for a requestAnimationFrame() tick to update after a "scroll" event, but newer version of Safari repaint earlier which could lead to things looking jerky in certain cases, so we switched back to immediately updating ScrollTrigger on every "scroll" event. See https://greensock.com/forums/topic/34062-greensock-scrolltrigger-animation-jumping-when-scrolling/
FIXED: in some rare cases, a ScrollSmoother-based page couldn't be scrolled all the way to the bottom. This is usually related to nested pins. See https://greensock.com/forums/topic/34056-nested-pins-dont-work/
IMPROVED: Flip plugin tweens that are created inside a gsap.matchMedia() or gsap.context() will now jump to the end which is the more intuitive behavior.
IMPROVED: you can set autoResize: false on a ScrollSmoother's configuration object to have it NOT automatically resize the body when the content resizes.
IMPROVED: ScrollSmoother is gsap.context()-aware, meaning when a ScrollSmoother is created inside a context and that context gets reverted, the ScrollSmoother will also get killed. This applies to gsap.matchMedia() as well.
FIXED: regression in 3.11.1 - if you ScrollTrigger.refresh() when the scroll position is already in the active part of a ScrollTrigger with callbacks, it may fire those even though there was no movement.
FIXED: checking the scroll() of a ScrollTrigger immediately after you manually change the scroll position may result in a cached value being used instead of the new/fresh one.
FIXED: if you alter a child tween's duration when it's inside of a timeline that has smoothChildTiming set to false, the duration of the parent timeline may not be updated. See https://greensock.com/forums/topic/33806-adding-a-new-tween-to-a-played-timeline-and-play-it-again
FIXED: if a ScrollSmoother is in the process of smoothly animating the scroll when the content resizes and/or a ScrollTrigger.refresh() is triggered, it will now continue properly instead of stopping. See https://greensock.com/forums/topic/33552-when-is-it-safe-to-call-scrollsmootherscrollto-after-dynamically-adding-an-element-to-the-dom/
FIXED: regression in 3.11.0 could cause .from() or .fromTo() tweens to appear not to render their initial state properly in certain situations. See https://greensock.com/forums/topic/33829-stagger-with-from-and-opacity-is-broken-in-last-gsap-update
FIXED: if you use one of the new independent CSS transform components like "scale", "translate", or "rotate" (NOT as a part of "transform"), and there's no regular transform applied, it may not get parsed properly. See https://greensock.com/forums/topic/33861-gsap-bug-with-scale-animation/
FIXED: if you apply a Draggable to an SVG element and attempt to interact with anything in the parent on a touch device, it may not honor native gestures like pinch-zooming or touch-scrolling. See https://greensock.com/forums/topic/33835-how-to-keep-native-scrollingzooming-on-non-draggable-svg-elements/
FIXED: if you force the playhead of the parent of a yoyo'd animation beyond its end position before it ever started (meaning the child's playhead would go from 0 to...0!), it didn't fire its onComplete. See https://greensock.com/forums/topic/33746-completing-all-currently-running-animations/
FIXED: a regression in 3.11.0 caused from() tweens of non-CSS properties of DOM elements not to work properly. See https://greensock.com/forums/topic/33878-the-counter-number-does-not-work-with-the-new-version-3111/
FIXED: if you gsap.getById() a timeline that has a ScrollTrigger BEFORE it has even started, it may not find it. See https://greensock.com/forums/topic/33889-get-timeline-by-its-id/
FIXED: if you kill() a ScrollSmoother, it may remove the "height" property of the .
FIXED: if you applied the CSS scroll-behavior: smooth to a page with ScrollTriggers, the page may scroll back up to the top in a certain scenario.
FIXED: window.history.scrollRestoration was set to "manual" by ScrollTrigger, but now it is restored to the original value after refresh() so that the window's scroll position has a better chance of being restored. See https://greensock.com/forums/topic/33990-scrolltrigger-lose-scrolltop-on-history-back/
FIXED: there was a regression in 3.11.0 that could cause fromTo() tweens to render their initial position incorrectly in a very rare, specific scenario.
IMPROVED: Draggable converts x/y back into "px" if you set it to a different unit outside of Draggable, like if you tweened to x: "100%" for example. See https://greensock.com/forums/topic/33616-need-double-click-on-draggable-to-fire-function/
IMPROVED: if you revert() a gsap.context(), it will kill any delayedCalls that were created in that context.
FIXED: a regression in 3.11.0 caused the ScrollSmoother's onUpdate method to get the Tween instance passed as the only parameter instead of the ScrollSmoother instance itself. See https://greensock.com/forums/topic/33605-gsap-3110-scrollsmoother-onupdate-returns-a-tween-instance-in-stead-of-scrollsmoother/
FIXED: regression in 3.11.0 could cause SVG elements with non-identity values in the "transform" property to revert to an identity matrix.
FIXED: if a pinned element has flex-basis of something other than "auto", it would be changed to "auto" during the pinning.
FIXED: the lockAxis feature of Observer might allow a small amount of movement on the opposite axis on the very first drag event.
FIXED: if you set a toggleAction of a ScrollTrigger to "reverse", fastScrollEnd: true would force it to its end instead of its start (only when scrolling fast of course). See https://greensock.com/forums/topic/33511-scrolltrigger-handling-fast-scrolls-pages-already-scrolled-on-load/
FIXED: regression in 3.11.0 could cause an SVG element's transform-origin to be calculated incorrectly in a .from() or .fromTo() tween.
FIXED: a regression in 3.11.0 caused the old ScrollTrigger.matchMedia({...}) syntax not to function properly. See #514
FIXED: if you use Flip plugin to flip between two elements that have matchin data-flip-id values and one of them is invisible (display: none), it will no longer try to flip them. Instead, it includes them in the onEnter/onLeave.
FIXED: function-based values inside keyframes inside tweens that also have a stagger weren't properly passing along the index and targets Array to the function-based value. See https://greensock.com/forums/topic/33717-function-based-values-in-keyframes-since-gsap-39/
Read more
IMPROVED: DrawSVGPlugin only warns once now when you use vector-effect="non-scaling-stroke" and scale something non-proportionally. See https://greensock.com/forums/topic/31881-warning-drawsvgplugin-and-vector-effect-property-in-safari-chrome-and-firefox/
IMPROVED: a ScrollTrigger.refresh() will now force a ScrollSmoother's wrapper element's scrollTop to 0 in order to work around an edge case where the browser automatically set it due to a hash in the URL for example. See https://greensock.com/forums/topic/31897-scroll-to-different-page/#comment-159550
IMPROVED: forced scroll-behavior to "auto" on / to override Bootstrap's "smooth" that it adds (and breaks things).
IMPROVED: worked around iOS bugs that cause the frame rate to appear to drop in half while touch-scrolling on iOS with ScrollSmoother (only while finger is on screen).
FIXED: regression in 3.10.3 caused ScrollSmoother effects not to work properly if you scroll down on a page and then resize the viewport
FIXED: if you ScrollTrigger.normalizeScroll(true) and then ScrollTrigger.normalizeScroll(false), it could cause touch-scrolling not to work properly on some mobile devices.
FIXED: when pinning elements with ScrollTrigger using transforms rather than position: fixed, if you're animating the y position of the pinned element itself it could throw an error.
FIXED: on initial page load, if the page was scrolled down, ScrollSmoother may render the page at the top.
FIXED: when ScrollTrigger.normalizeScroll() is applied on a page that does NOT have the initial scale set to 1 like , touch-scrolling may move at the wrong speed.
FIXED: if you ScrollTrigger.normalizeScroll({ type: "pointer,wheel" }) and then drag on the scrollbar in the browser, it may not update ScrollSmoother's position.
NEW: ScrollSmoother now has a static .refresh() and instance-level .refresh() methods as a convenience (identical to ScrollTrigger.refresh() and smoother.scrollTrigger.refresh() but we found those weren't as intuitive).
IMPROVED: Observer will trigger an onMove when an onDrag occurs (rather than prioritizing the onDrag over onMove)
IMPROVED: if you set paused(true) on a ScrollSmoother, it'll now allow wheel scrolling on things other than the body (like modals). See https://greensock.com/forums/topic/31685-scrollsmoother-and-modal/
IMPROVED: if you forget to add a wrapper element for ScrollSmoother and it automatically generates one for you and then you (or your framework) call ScrollSmoother.create() AGAIN, it'll find that first wrapper that was auto-generated and reuse that instead of creating another one. See https://greensock.com/forums/topic/31790-scroll-smoother-with-swup/
FIXED: input elements like , , etc. will now get focus properly when you tap on them on a mobile device when normalizeScroll is enabled.
FIXED: if you paused(true) a ScrollSmoother, buttons may not respond to clicks.
FIXED: when a ScrollSmoother's .offset() was called, the target element would always end up with a transform (even if it was translate(0,0)). It wouldn't visually change anything, but the mere fact that it had a transform could have negative effects like creating a new container boundary.
FIXED: ScrollSmoother.scrollTo(...) may (in one particular situation) scroll smoothly even if you set the smooth parameter to false.
FIXED: if you disable() an Observer WHILE dragging, it didn't may continue firing onDrag events until released.
FIXED: if you kill() a ScrollSmoother, it didn't reset the height of the to "auto". See https://greensock.com/forums/topic/31639-scrollsmoother-refresh-after-routing/
FIXED: pinning could be thrown off if the window gets resized after scrolling (regression in 3.10.0). See https://greensock.com/forums/topic/31699-scrolltrigger-pin-breaks-on-page-rsize/
FIXED: a regression in 3.10.0 could cause snapping not to work properly after resize in some scenarios. See https://greensock.com/forums/topic/31633-cannot-get-scrollsmoother-to-work-with-scrolltrigger-snapping/
FIXED: if you try animating an SVG on a motion path, it would throw an error because elements don't have a way to get local bounding box coordinates like .getBBox().
FIXED: if you enable ignoreMobileResize in ScrollTrigger/ScrollSmoother, it may not trigger a refresh when the user changes their mobile device's orientation.
IMPROVED: you can call a ScrollSmoother's .effects() method and omit the config object if you want it to just pull from the data attributes.
FIXED: ScrollSmoother could show a warning in the console in browsers that don't support overscroll-behavior (like Safari).
FIXED: if you load ScrollTrigger or Observer AFTER you load GSAP in the (all loaded BEFORE the exists), it would throw an error. See https://greensock.com/forums/topic/31624-cannot-load-register-scrolltrigger-3100-or-3101/
IMPROVED: you can add a scrollSpeed multiplier to an Observer which is very useful if you want to invert the direction (scrollSpeed: -1)
FIXED: TypeScript definition file fixes, like Observer and ScrollSmoother needed to be added to the index.d.ts file. See https://greensock.com/forums/topic/31596-typescript-eslint-question/
FIXED: if you define a function-based "momentum" in ScrollTrigger.normalizeScroll({ momentum: self => {...} }) it wouldn't work properly (only numbers worked, not function-based values).
FIXED: default for the "type" of Observer is "wheel,touch,pointer" ("scroll" is not included anymore by default because it's better to opt-in due to the fact that drag-srolling could cause directional confusion).
Read more
FIXED: if you do a .fromTo() and the "from" part has a numeric value (no unit) that does NOT have a default unit defined in gsap.config({units:{}}), it wouldn't get added automatically. Now it uses the unit from the current value in that case.
IMPROVED: Flip's "absolute" feature works better now with grid. It also assigns an explicit width/height to targets that aren't included in the "absolute" ones in order to prevent collapsing.
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs