Author Share Posted February 6 TLDR: Yes, I do have two simple solutions for one simple problem*. I would not bother anyone in the forum if looking at those, in isolation, could solve my issue. It is the confusing part that I'm lost in. I understand that no one likes the confusing part and would like me to break it down in easy to solve bits. But I already did that on my own. I take things apart, fix them isolated, but when I put them back together things break again—in another way. I try again, as I'm desperate, but I do understand that I cannot expect anyone to take the time and effort to dig through the confusing part. And I'm already and forever grateful for all the time anyone has put into my difficulties. 1 hour ago, GreenSock said: If I understand your dilemma correctly, the problem is that you're telling ScrollTrigger NOT to refresh when the window resizes, thus when the address bar shows/hides on iOS and it completely resizes the page, you now have inaccurate start/end values because no refresh() happened, thus the snapping points are off. Your content changed size (which of course would affect the snapping positions) but you prevented ScrollTrigger from refreshing those, so the snapping kicks in to the wrong spot. That is not the problem, as far as I understand it. The way things are built, neither the body nor any other container change size (height) when the address bar is retracting or expanding again. I have verified that in the dev-tools on my connected Mac often. But I will dig deeper into that as soon as I can. (In my original project, I either have to deal with a resize in more ways than the re-layout of the ScrollTrigger, that's why I kill and rebuild it. Alternatively, I will have to make sure not to let the content change its size, which I do now.) 1 hour ago, GreenSock said: You lost me again in that wall of text, links to 8 different CodePens or previous posts, summaries, rephrasings, references to the "main problem" (verses side problems?), "B version of demo 3", demo 2, Version A, version B, etc. 😬 Yes, I fully understand that this is frustrating. No one better than me because I suffer with the situation for days now, each time I thought I fund a reproducible solution for one difficulty, the thing behaves the other way around in the next step. 2 hours ago, GreenSock said: If that's not the "main problem", please give it another shot in "explain it to a 5 year old" (or an old guy with COVID brain) mode I'm certain that your brain—even in covid-mode—is much superior to mine. The 'not snapping at the last panel on iOS' problem I'm having right now, I though was solved by using Version B. And it was consistently until it did no longer. In the next step, I went on to cautiously trying to implement my 'rebuild on resize' method. (The one that had broken before after working for over a year, and you helped me fix it in the last thread with the beta version of ScrollTrigger 3.11.5.) Everything seemed to work, except the last step that should send the system back to the panel it showed before the resize. (that had worked on Saturday with version A—before I stumbled over the 'not snapping at the last panel on iOS' thing) ScrollTrigger reported (logged) that It was at the intended position, but it didn't show at the scrollbar or the timeline. Even manually sending the time-line to the desired position of forcing a ScrollTrigger update did not change a thing, on any system. While researching into that issue, I found that the not snapping on iOS had reappeared, for no reason I could find. So, I went back a step and tried to understand and solve the 'not snapping at the last panel on iOS' again. (Any workaround to that problem would likely involve me manually setting the ScrollTrigger scroll() and/or the timeline...) *the two isolated problems: 2 hours ago, GreenSock said: I was hoping for more like "here's one simple CodePen...when I set autoRefreshEvents to only DOMContentLoaded (line 22), snapping won't work at the very bottom (it'll scroll back up)" That is exactly the case in demo 3 as stated there: 6 hours ago, iDad5 said: You (hopefully) can reproduce that by commenting on lines 22 and following in and out in —testing on iOS/iPadOS. (For me commented out it works in iOS, commented in it never sticks at the last panel/label). My statement likely became unclear due to the unsless 'on' and the embedded CodePen which replaced the linked text 'here'. The fact that in this one case there is an easy to see causality and solution in itself is worth nothing. The solution (to simply not limit refresh), would work in this case, but it does not in the next even though it works the same way. I have a similar situation with 'Version B' as solution. It itself is five-year-old-friendly: demo 1 does not snap at the last panel, changing ScrollTrigger creation to Version B makes it work. So, the broken down and simplified versions you wish for I have already shown them here, including their supposed solutions. But those lead me nowhere. Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now