splide icon indicating copy to clipboard operation
splide copied to clipboard

Placing a slider inside a container with a transform: rotate breaks the autoscroll

Open wplit opened this issue 2 years ago • 1 comments

Checks

  • [X] Not a duplicate.
  • [X] Not a question, feature request, or anything other than a bug report directly related to Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions

Version

v4.1.4

Description

With the autoscroll feature - if the slider itself or a container is rotated, the autoscroll speed keeps changing overtime. Going very fast or slow, and then accelerating and deaccelerating as the slider reaches different slides.

Reproduction Link

https://codepen.io/wplit/pen/rNqjKwO

Steps to Reproduce

Setup autoscroll as per the steps in the docs.

Add transform:rotate(6deg) to the slider or any container of it.

Note that positive deg rotation speeds up the slider, negative slows it down.

In both situations the speed isn't consistent, so it's not like we can just adjust the speed option to account for it. It's accelerating and deaccelerating and it moves.

Expected Behaviour

The speed would be the same as if there were no rotation.

wplit avatar Apr 23 '23 02:04 wplit

Hi, I am experincing exactly the same issue..

richi-coder avatar Jun 08 '24 23:06 richi-coder