Search and Top Navigation
#5057 closed bug (fixed)
Opened January 12, 2010 08:54PM UTC
Closed October 27, 2010 07:33PM UTC
multiple range sliders on a single page don't behave independently
Reported by: | squaley | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8 |
Component: | ui.slider | Version: | 1.7.2 |
Keywords: | slider multiple handles range | Cc: | |
Blocked by: | Blocking: |
Description
From http://bit.ly/6S8nc1 :
When manipulating multiple range sliders (two handles per) on a single page, the position of the handle with the most recent focus is adopted by the next slider used.
Example: I've put multiple sliders on a single page. They are range sliders, with the following options set:
min: 0
max: 4
range: true
values: [0,4]
On the first slider, I move the min handle up 2 positions. This correctly sets this.options.values to [2,4].
Then, on any other slider, I mousedown on the max handle. It seems to think its own this.options.values is set to [2,4], same as the first slider, even though they are instantiated separately. Once the max handle is dragged to a new position, the min handle magically snaps to position 2.
Attachments (0)
Change History (3)
Changed January 13, 2010 12:23AM UTC by comment:1
milestone: | TBD → 1.8 |
---|
Changed January 14, 2010 01:30AM UTC by comment:2
Am noticing the sliders work as advertised if 1) they are instantiated one at a time; and 2) the options are spelled out explicitly in the first arg of slider(). So:
FAILS (not instantiated separately):
$('#slider0, #slider1, #slider2').slider({max: 7, range: true, values: [2,4]});
FAILS (not instantiated separately):
var slider_defaults = {max: 7, range: true, values: [2,4]};
$('#slider0, #slider1, #slider2').slider(slider_defaults);
FAILS (options not explicit in first arg):
var slider_defaults = {max: 7, range: true, values: [2,4]};
$('#slider0').slider(slider_defaults);
$('#slider1').slider(slider_defaults);
$('#slider2').slider(slider_defaults);
WORKS:
$('#slider0').slider({max: 7, range: true, values: [2,4]});
$('#slider1').slider({max: 7, range: true, values: [2,4]});
$('#slider2').slider({max: 7, range: true, values: [2,4]});
Changed October 27, 2010 07:33PM UTC by comment:3
milestone: | 1.9 → 1.8 |
---|---|
resolution: | → fixed |
status: | new → closed |
This was fixed in 1.8 with the widget factory update.