jQuery: The Write Less, Do More JavaScript Library

Ticket #2438 (closed bug: fixed)

Opened 2 months ago

Last modified 4 days ago

[slider] strange behavior for wide range

Reported by: alexo Assigned to: joern
Type: bug Priority: major
Milestone: 1.2.4 Component: ui
Version: 1.2.3 Keywords: slider multiple handle
Cc: Needs: Review

Description

For the following slider (with multiple handles), when handle values are changed, the console will output both handle values. The are at least two anomalies:
1) the steps value is ignored
2) the max handle value is not correct for the right edge case

<h2>3. Multiple handles, with range</h2>
<div class="playground">
	<div id='example3' class='ui-slider-2' style="margin: 40px;">
	<div class='ui-slider-handle'></div>
	<div class='ui-slider-handle' style="left: 188px;"></div>
	</div>
</div>
function onChange(e, ui) {
  var el = ui.instance.element;
  console.log(el.slider("value",0) + " - " + el.slider("value",1));
}
$('#example3').slider({ minValue: 100, maxValue: 50000, steps: 1000, range: true, change: onChange });

Thank you!

Alex Objelean

Attachments

Change History

Changed 2 months ago by paul

  • owner changed from paul to braeker

Changed 2 months ago by joern

  • owner changed from braeker to joern

Changed 2 months ago by joern

Actually the steps value isn't ignored. If you output the current value on the Firebug console on slide and use the keyboard to change the value, you can see that each step is 249. The result is still rather strange, not sure yet what the issue is.

Changed 2 months ago by alexo

I would expect that each step would increment the current value with 1000 (the step value), at least this was the behaviour in jQueryUI-1.0.

Changed 5 days ago by joern

  • summary changed from jQueryUI Slider plugin - strange behavior for wide range to [slider] strange behavior for wide range

Changed 4 days ago by paul

  • status changed from new to closed
  • resolution set to fixed

Fixed in r5539.

Changed 4 days ago by joern

Can't confirm this as fixed.

ui/tests/uiTest.slider.html, options, slider-options-range: doesn't work at all

Note: See TracTickets for help on using tickets.