Jump to content
GreenSock

cedricz

NS_ERROR_FAILURE in mozilla

Go to solution Solved by cedricz,

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, 

 

I try to make an svg file with GSAP embedded.

 

It works with chrome but in mozilla i have an error NS_ERROR_FAILURE on gsap code. 

 

How i could resolve it ? 

 

 

Thanks

 

 

 

Link to comment
Share on other sites

Make sure you're not trying to animate (or set) properties on an SVG element that isn't in the DOM yet or has display:none because Firefox burps. That's not a GSAP issue - it's just a Firefox quirk with SVGs. 

  • Like 3
Link to comment
Share on other sites

  • Solution

Thanks Jack,

 

'display:none' is really the problem with Firefox.

It works in IE, Chrome and Opera.

 

I will modify my code to no use display at all.

 

Regards

Link to comment
Share on other sites

To add my two cents ;)

 

This is definitely a Firefox OCD thing. Firefox is real strict with SVG elements having CSS display:none property like Jack advised above. Since the Firefox rendering engine will remove anything that has a CSS style of display:none  from the rendering tree. See SVG display.

 

if you need to control the display on your SVG elements then use the SVG visibility attribute or its css equivalent visibility: hidden
 

SVG display: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/display

SVG visibility attribute: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/visibility

 

:)

  • Like 3
Link to comment
Share on other sites

Thanks Jonathan, was helpful, it's work totally

  • 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.
×