Jump to content

Search In
  • More options...
Find results that contain...
Find results in...
Praney Behl

Firefox: Nested SVG + GSAP Draggable = ERROR!

Recommended Posts

Hi guys,


Just found something silly with Firefox. I am using nested svgs and an rectangle element inside it. Using draggable on the rectangle in the nested svg works fine in Google chrome but not in Firefox. It throws out an error @ Draggable.js:252:0 "TypeError: element.style is undefined"


Here is an example:

See the Pen jPKbqO?editors=011 by praneybehl (@praneybehl) on CodePen

Link to comment
Share on other sites

Ah yes, it looks like in your particular scenario, you're using a library that creates nested SVG elements and Firefox incorrectly reports a null offsetParent. It's a browser bug. I've got code in place that'll work around it in the next release. You can preview an uncompressed version at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/Draggable-latest-beta.js if you want. 

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