Ticket #5591 (closed bug: fixed)
Slider: can go outside min and max with keyboard
| Reported by: | koder | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.8.2 |
| Component: | ui.slider | Version: | 1.8.1 |
| Keywords: | min value pagedown pgdown | Cc: | tim.koder@… |
| Blocking: | Blocked by: |
Description
When you create a slider with a min and max set. It will not slide under that min. That is correct.
However, when you use PageDown you *can* go under the min value! This is unwanted behaviour.
REPRODUCE:
- Make a slide that prints out its current value
- Move a slider up by a few steps
- Press PageDown all the way
- In some cases, it will go below its minimum value
EXAMPLE:
Change History
comment:2 Changed 3 years ago by rdworth
- Summary changed from Slider can go below its defined minimum to Slider: can go below its defined minimum with PageDown
comment:3 Changed 3 years ago by rdworth
- Status changed from new to closed
- Resolution set to fixed
Fixed in b7c0823
comment:4 in reply to: ↑ description Changed 3 years ago by watanabe
- Status changed from closed to reopened
- Resolution fixed deleted
Please forgive me for reopening this ticket.
Thanks for rdworth's patch.
"UP, RIGHT have the same problem." means,
.slider({
min : 0,
value : 90,
max : 100,
step : 15
});
90(curVal) + 15(step) = 105(newVal) > 100(valueMax).
Could I ask you to call _trimAlignValue() when adding/subtracting step?
comment:5 Changed 3 years ago by rdworth
- Summary changed from Slider: can go below its defined minimum with PageDown to Slider: can go outside min and max with keyboard
comment:6 Changed 3 years ago by rdworth
- Status changed from reopened to closed
- Resolution set to fixed
Thanks watanabe.
Further fixed in 114c001
comment:8 Changed 3 years ago by jzaefferer
Autocomplete: Store term when selecting an item to prevent another search triggered before blur. Fixes #5591 - Home and End keys trigger search
Changeset: dea2f8a7fc1d7c1d8fbf69aa50d7c1f28c3f35b6


I think it's bug.
jQuery UI 1.8.1
jquery.ui.slider.js
line 186 (ui.slider _create this.handles.keydown)
PAGE_UP, UP, RIGHT, DOWN, LEFT have the same problem.
line 204 (the end of the switch block)
may work.