Search and Top Navigation
#7477 closed bug (fixed)
Opened June 15, 2011 04:34PM UTC
Closed October 17, 2012 03:15AM UTC
Last modified October 17, 2012 03:16AM UTC
Setting min/max options does not update view
Reported by: | maenu | Owned by: | petersendidit |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.1 |
Component: | ui.slider | Version: | 1.8.13 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you change the min or max options, the visual state of the slider does not get updated, but it should.
Example:
$("#slider").slider({ range: true, min: 0, max: 3, values: [1, 2] }) ... $("#slider").slider("option", "min", 1); // the bar still looks like -|--|- ... var values = $("#slider").slider("option", "values"); $("#slider").slider("option", "values", values); // this is an ugly workaround, but triggers the change event
I'd propose either to catch that in _setOption and handle as setting the values, but not trigger the change event - since only the min/max changed, and not the values - or add a refresh method like the button has one.
Attachments (0)
Change History (8)
Changed June 15, 2011 10:06PM UTC by comment:1
Changed June 16, 2011 12:54AM UTC by comment:2
I'm inclined to say that the behavior for the change event should be modified. We have a tendency to not trigger change events if values don't actually change (at least in newer widgets). We should probably be consistent here and modify this for 1.9.
Changed October 11, 2012 02:53PM UTC by comment:3
milestone: | 1.9.0 → 1.11.0 |
---|
Changed October 15, 2012 05:40PM UTC by comment:4
status: | new → open |
---|
This is still relevant in 1.9. Here's a fiddle showing the problem described http://jsfiddle.net/tj_vantoll/pgKfb/.
Changed October 16, 2012 05:32PM UTC by comment:5
owner: | → petersendidit |
---|---|
status: | open → assigned |
Changed October 16, 2012 05:43PM UTC by comment:6
Pull request to fix this: https://github.com/jquery/jquery-ui/pull/763
Changed October 17, 2012 03:15AM UTC by comment:7
resolution: | → fixed |
---|---|
status: | assigned → closed |
Slider: Update UI when min or max option changes. Fixes #7477 - Setting min/max options does not update view.
Changeset: f37008eeb11eb12571cb65b1010a7e5d367064ac
Changed October 17, 2012 03:16AM UTC by comment:8
milestone: | 1.11.0 → 1.9.1 |
---|
Replying to [ticket:7477 maenu]:
Triggering change in any case would be safest as the value might change as the result of the min/max change. This would also be consistent with the design of the change event. From specs on http://wiki.jqueryui.com/Slider "triggers when the slider has stopped moving and has a new value (even if same as previous value)"