Jump to content
Search Community

Bug with AttrPlugin 0.4.0 in latest firefox mac/pc

martis test
Moderator Tag

Go to solution Solved by martis,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello,

 

Ran into a bug in the latest version of firefox when using AttrPlugin...

 

I cannot create a codepen as its a real complex build but here is my error for both Mac and PC firefox. Works fine on all other platforms...

 
NS_ERROR_FAILURE: 
deploy/js/libs/greensock/TweenMax.min.js
Line 15
 
My code looks like:
 
Note the HTML is inside of an <svg> element
 
<image id="animation-careers-na-cloud-mask-1" x="194" y="0" clip-path="url(#cloud-mask)" width="450px" height="281px" xlink:href="_global-assets/img/careers-na/cloud-1.png" preserveAspectRatio="xMidYMin slice"/>
cloudMaskTimeline1.to($cloudMask1, t, {attr:{x:-700}, ease:Linear.easeInOut})
Thanks in advanced!

 

Link to comment
Share on other sites

  • Solution

For what it's worth... I was applying rotationZ: 0.01 to all three images inside my svg element to get smooth movement. This was causing Firefox to throw an NS_ERROR_FAILURE. I took off the rotationZ: 0.01 on the images and put it on the svg element itself which fixed the issue and retained the smooth movement.

  • Like 2
Link to comment
Share on other sites

Glad you figured out a solution. By the way, Firefox has a known bug that'll throw that error if/when you try to call a method like getBBox() (which CSSPlugin does internally) on an SVG element that is NOT attached to the document (and I believe it also happens if it has display:none if I remember correctly). So basically it's not a good idea to try to tween/set() SVG elements that aren't attached to the doc yet (or invisible). 

  • Like 1
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.
×
×
  • Create New...