Kency Posted July 8, 2022 Share Posted July 8, 2022 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...
SteveS Posted July 8, 2022 Share Posted July 8, 2022 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...
GreenSock Posted July 8, 2022 Share Posted July 8, 2022 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...
Kency Posted July 9, 2022 Author Share Posted July 9, 2022 Thanks all. I will try. Link to comment Share on other sites More sharing options...
Kency Posted July 9, 2022 Author Share Posted July 9, 2022 2 solutions not working Link to comment Share on other sites More sharing options...
Cassie Posted July 9, 2022 Share Posted July 9, 2022 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...
Kency Posted July 10, 2022 Author Share Posted July 10, 2022 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...
GreenSock Posted July 10, 2022 Share Posted July 10, 2022 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