#5602 closed bug (fixed)
Slider Does Not Exhibit Proper Behavior When Switching Range
Reported by: | jashugan | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.1 |
Component: | ui.slider | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When switching the range of a slider from min to max (or vice versa), the slider stops working correctly. For example, take this bit of code.
$("#MasterSlider").slider({range: "min", min: 1, max: 10, step: 1}); // later on... $("#MasterSlider").slider('option', 'range', 'max')
When the range is set to "min", the filled portion of the bar appears on the left. When set to "max", the filled portion of the bar appears on the right. However, when switching from "min" to "max" on an existing slider, the behavior becomes unexpected in two ways.
- It doesn't update the filled region from left of the slider button to right of the slider button.
- When moving the slider button the filled area doesn't work properly. (see attached image).
Attachments (1)
Change History (11)
Changed 13 years ago by
Attachment: | Screen shot 2010-05-10 at 1.24.41 PM.png added |
---|
comment:1 Changed 13 years ago by
comment:3 Changed 13 years ago by
Fix committed to http://github.com/lthibodeaux/jquery-ui/commit/12189f7
Somewhat sloppy on the commit message but I've been prodding for hours and it's late.
comment:4 Changed 13 years ago by
Reconciled some changes that were not mine with the code used to develop the fix. Final commit at:
comment:6 Changed 10 years ago by
Milestone: | 1.9.0 → 1.11.0 |
---|
comment:7 Changed 10 years ago by
Status: | new → open |
---|
This is still an issue in 1.9: http://jsfiddle.net/tj_vantoll/rF2cr/.
comment:9 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Slider: allow range option to be changed. Fixed #5602 - Slider Does Not Exhibit Proper Behavior When Switching Range
Changeset: df077abfc2a236a373d2080a9ceae97bb48c2620
comment:10 Changed 10 years ago by
Milestone: | 1.11.0 → 1.10.1 |
---|
It seems "changing option 'range'" is not implemented properly.
See:
jQuery UI 1.8.1 uncompressed version.
jquery.ui.slider.js
line 80(slider _create)
line 516(slider _setOption)
seems to work when switching the range of a slider from min to max (or vice versa),
not to work when from (to) true (false).
"this.range" should be rebuilded.