scrollreveal icon indicating copy to clipboard operation
scrollreveal copied to clipboard

Bugs when page height changes

Open kannafay opened this issue 1 year ago • 9 comments

I have found that when the height of a webpage changes, the location of the trigger will change, and even using sync() can cause bugs

This is a normal situation:

https://github.com/jlmakes/scrollreveal/assets/85301126/2bc03cc9-a4cd-4a35-a806-73fe68c4aee3

This is the effect of using ScrollReveal().sync()

bug

https://github.com/jlmakes/scrollreveal/assets/85301126/be7983f7-833a-437f-ac20-1846ffd9fc49

I don't know what's wrong. I trigger ScrollReveal().sync() when I click collapse panel, but it seems that something's wrong with it

Environment

  • Operating System: Windows 11
  • Browser Version: Google Chrome 121.0.6167.189
  • ScrollReveal Version: v4.0.9

kannafay avatar Feb 24 '24 13:02 kannafay

hi bro ,who can help me

kannafay avatar Feb 27 '24 07:02 kannafay

Hello, I have the same problem 😥 Have you found a solution ?

GeistFighter avatar May 16 '24 19:05 GeistFighter

same problem here #565

GeistFighter avatar May 16 '24 19:05 GeistFighter

same problem here #565

However, it does not solve my problem

kannafay avatar May 16 '24 19:05 kannafay

same problem here #565

I need to recalculate the height when triggered, but it doesn't take effect

kannafay avatar May 16 '24 19:05 kannafay

I found the function ScrollReveal().delegate(); which I use instead of ScrollReveal().sync(); and it now works for me, as if it recalculates the size

GeistFighter avatar May 16 '24 19:05 GeistFighter

#567

GeistFighter avatar May 16 '24 19:05 GeistFighter

@GeistFighter Let me try, bro.

kannafay avatar Dec 06 '24 13:12 kannafay

@GeistFighter Bro, it's very nice!!! delegate() solved my problem

kannafay avatar Dec 06 '24 13:12 kannafay