zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
891 stars 232 forks source link

Clicking on track on vertical slider is buggy #156

Closed pt8o closed 4 years ago

pt8o commented 4 years ago

This can be reproduced on the your demo site itself.

  1. Scroll down to the vertical slider. Click on the track: the nearest thumb should jump to where you clicked
  2. Refresh the page (e.g. cmd+r). The page should reload already scrolled to the same location.
  3. Click the track

Expected:

Actual:

Tested on Linux and Mac using the latest Firefox and Chrome.

If you scroll to the top of the page again and then reload, it works again! So this bug only seems to happen if you refresh the page while scrolled down.

output

stonebk commented 4 years ago

OK, I wasn't able to repro in Chrome, but it did repro in Firefox.

stonebk commented 4 years ago

Also, thank you @pt8o for the detailed bug report!

stonebk commented 4 years ago

Looks like it is only an issue with the vertical slider, can you confirm?

pt8o commented 4 years ago

@stonebk yep, only on the vertical slider.

I was able to reproduce on Chromium on Linux, I can try Chrome on Mac again tomorrow

stonebk commented 4 years ago

OK, the issue isn't browser related, it's related to window scrolling. If you are scrolled to the top, it works as expected, but if you scroll down, then it breaks.

Working on a fix...

stonebk commented 4 years ago

Published in react-slider@1.0.2