Share Posted July 8 When I focus Input on browser Iphone, screen auto scroll but on PC or android it normal. Do you have any solution? Thanks. You can view from: RPReplay_Final1657298657.mp4 - Google Drive Link to comment Share on other sites More sharing options...
Share Posted July 8 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 }); 3 Link to comment Share on other sites More sharing options...
Share Posted July 8 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" }); 1 Link to comment Share on other sites More sharing options...
Author Share Posted July 9 Thanks all. I will try. Link to comment Share on other sites More sharing options...
Author Share Posted July 9 2 solutions not working Link to comment Share on other sites More sharing options...
Share Posted July 9 Do you have a minimal demo Kency? We'll be more able to help then. Link to comment Share on other sites More sharing options...
Author Share Posted July 10 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 More sharing options...
Share Posted July 10 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. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now