RolandSoos

Timeline's onComplete callback fired twice when GSDevTools added

Recommended Posts

Well, its is very strange. I was in the middle of investigating an other bug when I stuck with this one. When the GSDevTools is in the pen the onComplete callback fired twice on the attached pen.

Share this post


Link to post
Share on other sites

I'm sorry but I'm not seeing GSDevTools in your demo. When I added it I did not see the onComplete fire twice.

 

 

Perhaps I'm missing something, feel free to clarify or provide a demo that clearly illustrates the issue without us having to edit it.

 

Thanks

  • Like 1

Share this post


Link to post
Share on other sites

Thanks!

 

Ok, I can clarify:

 

  1. When the GSDevTools script is simply loaded (not instantiated with GSDevTools.create()) the onComplete in your callback fires twice (strange and unexpected).
  2. When GSDevTools script is removed the onComplete fires once (good and expected).
  3. When GSDevTools script is loaded and GSDevTools.create() is called the onComplete only fires once (good and expected)
  4. When GSDevTools script is loaded and GSDevTools.create() is called GSDevTools is really small and has a big red square ( strange, yet expected once you realize thereis a css rule for div in the css panel :) )

We will have to look into this deeper. Sorry for the confusion.

 

 

  • Like 3

Share this post


Link to post
Share on other sites

Hi @RolandSoos

 

Sorry your having this issue!

 

Have you tried to run your codepen in debug mode instead of in edit or full mode. The reason being is because edit and full mode run in an iframe. Whereas debug mode runs without an iframe. I frames can cause issues with browser console and the javascript parser.

 

In your codepen URL change /pen/ to /debug/ and check the console and see if you see it fire twice.

 

Like this /pen/ to /debug/ :

 

https://codepen.io/anon/debug/ZmVoXQ

 

See if that helps, this way we can rule out if codepen is causing an issue with GSDevTools?

 

Thanks and Happy Tweening :)

 

  • Like 1

Share this post


Link to post
Share on other sites

I actually had this happen to me a few months ago and then completely forgot to ask about it. Whoops. I encountered the same thing Carl mentioned. I had DevTools loaded in a pen but didn't use it with create() and I got a double fire of the onComplete. It happens in all modes of CodePen and I just tried it on a regular web page with the same result.

 

 

  • Like 2

Share this post


Link to post
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.