Jump to content
GreenSock

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

Error When focus input on Iphone browser

Recommended Posts

This is because the keyboard is shortening the screen which in turn is messing with the progress value of the scrollTrigger you are using for the horizontal scroll.

Try some combination of .normalizeScroll() and ScrollTrigger.config({ ignoreMobileResize: true });

  • Like 3
Link to comment
Share on other sites

That sounds right. But you may need to disable the auto refresh on resize because the ignoreMobileResize: true only ignores the change if it's within a certain percentage of the viewport height (intended for address bar show/hide). So maybe: 

ScrollTrigger.config({ 
  autoRefreshEvents: ScrollTrigger.isTouch === 1 ? "visibilitychange,DOMContentLoaded,load" : "visibilitychange,DOMContentLoaded,load,resize" 
});

 

  • Like 1
Link to comment
Share on other sites

Thanks all. I will try.

Link to comment
Share on other sites

2 solutions not working

Link to comment
Share on other sites

Do you have a minimal demo Kency?

We'll be more able to help then.

Link to comment
Share on other sites

19 hours ago, Cassie said:

Do you have a minimal demo Kency?

We'll be more able to help then.

Sorry, I use in project so quite difficult recreated, Currently I use disable and enable ScrollTrigger to resolve a problem although it not pretty. Thanks

Link to comment
Share on other sites

Well if you ever want some help chasing this down, just create a minimal demo with a few <div> elements and some inputs and show us how to recreate it and we'd be happy to take a peek. You don't need to use your actual project. In fact, it's MUCH better if you just isolate it in the most basic way possible in a CodePen. But if you're fine with the results you're getting now by disabling it and you don't have time/motivation to do the minimal demo, that's okay. 

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