Jump to content
Search Community

keeping the focus when using Flip on an input

Alex Jester test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hello,

I am trying to animate an input element using Flip for when the user is typing something, but when Flip is called my input is loosing the focus.

I tried calling a onComplete: function() { input.focus() }, but that doesn't work...

See the Pen KKQWOdV by jester6 (@jester6) on CodePen

Edited by Alex Jester
I added a codepen example of what I am trying to achieve
Link to comment
Share on other sites

  • Solution

Thanks for providing a minimal demo! I wish everyone did such a great job of boiling the question down and including a succinct demo. 

 

You're doing a bunch of extra work on every key press that really isn't necessary - here's how I'd do it: 

See the Pen poaPzgp?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Does that work better for you? 

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