Jump to content
Search Community

baraa

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by baraa

  1. On 3/9/2023 at 10:19 AM, Arman_ said:

    Hello, in my case the problem was when I load my react website, the initial current component which refreshes it is fine and the scroll position is also good but after we navigate to other components their I have images which load after I navigate to that component because of which scroll trigger position fails to load the right position as it doesn't refresh after the image loads.

    So, what I did is in react, there is an attribute called onLoad which gets triggered after the image loads.

    Hence, onLoad={()=>ScrollTrigger.refresh()} solved my problem.

    same problem here, I suspected that this is happening but didn't know that `onLoad` exists, so I tried it and it worked perfectly.
    So, I made an account just to thank you🙇‍♂️

    • Like 2
×
×
  • Create New...