radzen-blazor
radzen-blazor copied to clipboard
Addendum to #252: Moving a slider handle to the left/right does not result in the minimum/maximum value
Describe the bug Same like in issue #252: When moving a slider handle to the left, it does mostly not stop at the minimum value. When moving a slider handle to the right, it does mostly not stop at the maximum value.
To Reproduce
- Go to https://blazor.radzen.com/slider
- Move the mouse with clicked "Slider from 0 to 100" handle quickly beyond the left/right border. The minimum is always 0. The maximum is always 100. --> This works well.
- Move the mouse with clicked "Range Slider" left/right handle quickly beyond the left/right border. The minimum is always 0. The maximum is always 100. --> This works well.
- In the source code, change
IEnumerable<int> values = new int[] { 14, 78 };
toIEnumerable<int> values = new int[] { 0, 100 };
andint value = 67;
toint value = 0;
- Repeat steps 2 and 3. The handles now do not stop at minimum and maximum when the mouse is moved quickly beyond the borders.
Expected behavior Even when moving the mouse quickly far over the boundary the handle value should be the minimum/maximum.
Screenshots
(I added 2 spans to display the handle positions.)
I moved the mouse with clicked slider handle quickly beyond the left border and the handle stopped far before the min value.
I moved the mouse with clicked range slider left/right handle quickly beyond the left/right border and the handles stopped at 9 and 94.
Desktop OS: Windows 11 Browser: Chrome 97.0.4692.71, Edge 97.0.1072.55, Firefox 95.0.2
Additional context This also explains my comment on fix 5470222 because the start values of "Range Slider with negative values" are the min and max value.