dynamicweb / swiffy-slider

Super fast carousel and slider with touch for optimized websites running in modern browsers.
MIT License
250 stars 29 forks source link

Random Scrollposition #61

Closed straightvisions-matthias-bathke closed 2 years ago

straightvisions-matthias-bathke commented 2 years ago

Describe the bug The position of the scrollbar is random and changes upon refresh.

To Reproduce

  1. Go to https://lautstark-jrk.de/
  2. Scroll down to sliders
  3. Check scroll positions
  4. Refresh to see changing random position

Expected behavior With class slider-item-snapstart the scrollposition should be start, not a random position.

Screenshots screenshot-lautstark-jrk de-2022 10 11-09_37_12

https://user-images.githubusercontent.com/4689792/195025647-dde076da-6c94-4aff-8a10-a22d1d7ed787.mp4

Desktop

Problem seems not to occur on the following setups IOS Safari & Chrome Windows Firefox

nicped commented 2 years ago

Hi

Thank you for using Swiffy Slider.

I can see the issue, but I think it is one of the many plugins you have on the site - there is a lot of DOM manipulation happening after load.

I cannot reproduce the issue in an isolated environment with only the slider script involved - also it behaves as expected with same configuration on the config page: https://swiffyslider.com/configuration/?slider-item-show=slider-item-show4&slider-item-reveal=slider-item-reveal&slider-item-snapping=slider-item-snapstart&slider-nav-scrollbar=slider-nav-scrollbar

Can you reproduce the issue with no other scripts running on the page, I will be happy to look into it.

BR Nicolai

straightvisions-matthias-bathke commented 2 years ago

Hi Nicolai,

thank you for the fast response. I've found the issue, a prevent fouc script used the following css:

content-visibility: hidden;

After I've removed the line the issue is solved.

Kind regards,

Matthias

nicped commented 2 years ago

Great! Thanks for letting me know. Your site looks good by the way!