kobaltedev / kobalte

A UI toolkit for building accessible web apps and design systems with SolidJS.
https://kobalte.netlify.app/
MIT License
1.3k stars 75 forks source link

Frame drops in slider with minStepsBetweenThumbs #494

Open lfpraca opened 1 month ago

lfpraca commented 1 month ago

Describe the bug

When minStepsBetweenThumbs is set on the Slider component, freezes happen when moving the left slider at or near (right - min)/2 when sliding towards the right and at or near (right + min)/2 when sliding towards the left.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://kobalte.dev/docs/core/components/slider/'
  2. Scroll to 'Steps between thumbs'
  3. Slide the right thumb to 80
  4. Slide the left thumb towards the right
  5. Notice frame drops as the left thumb passes 35
  6. Slide the left thumb towards the left
  7. Notice frame drops as the left thumb passes 45

Expected behavior Expected the left thumb to slide smoothly throughout

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):