Open
Description
🐛 Bug report
Current Behavior
On certain slider edge cases, for example on a slider with lower limit at 97.25 and higher limit at 102.25 with a step of 0.1, the step is not always respected correctly (for example, I go to 100 to 100.2 instead of 100.1, but I correctly go from 100.2 to 100.3) and it is impossible to move the slider with keyboard arrows.
The slider limits intentionally don't match the range: except those edge cases, I can correctly move up and down with a step of 0.1, but when I am at 100.2 the next step is 100.25 which is the maximum, as I would expect.
Expected behavior
The step is respected correctly in all the situations.
Reproducible example
Sample of the issue on CodeSandbox
Your environment
Software | Name(s) | Version |
---|---|---|
Reach Package | @reach/slider | 0.13.0 (but happens also in previous versions, I tested down to 0.10.5) |
React | react | 17.0.1 |
Browser | Google Chrome | 88.0.4324.96 |
Assistive tech | None | None |
Node | node | v14.15.1 |
npm/yarn | yarn | 1.22.10 |
Operating System | macOS | 11.1 |