Jump to content

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

GSAP 3 -autoAlpha not working as expected

Recommended Posts

gsap.to(target, {duration: 0.3, autoAlpha: 0});


The expected behavior is that visibility will be set to hidden, but as you can see in this pen (see console) when you click the target (red div) the visibility is set to inherit. And because the target is still visible it's still clickable, so when it's clicked again, then the visibility is set to hidden.


I suspect this is a bug. With GSAP 2 the visibility is correctly set to hidden.

See the Pen KKpKEgv?editors=1111 by aashby13 (@aashby13) on CodePen

  • Like 1
  • Thanks 1

Share this post

Link to post
Share on other sites

Very interesting - the "back.in" ease would return 0.999999999999998 when feeding in a progress of 1, so that's why autoAlpha never quite triggered the flip to hidden. Gotta love floating point math issues. :) I've updated that in the next release which you can preview at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js




Good catch! And thanks for the reduced test case.

  • Like 3
  • Thanks 1

Share this post

Link to post
Share on other sites

Great! Thanks for being so on top of this.

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.