Jump to content
Search Community

GSAP 3 -autoAlpha not working as expected

aashby13 test
Moderator Tag

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