Slider Widget using snapValues will call "onValueChanged" when the value has not changed
The slider widget calls "onValueChanged" even when no changes to the underlying values have been made.
This is most pronounced when using snapValues and activeDragging. It calls onValueChanged many times with identical values.
To recreate, add the the following slider to the test_Slider.html test, drag the slider control and note all the extra callbacks in the debug output.
<div id="horizontalSliderSnap" dojoType="SliderHorizontal"
initialValue="50" minimum="0" maximum="100" snapValues="5"
activeDrag="true"
onValueChanged="dojo.debug ('onValueChanged: ' + arguments[0]);"
buttonStyle="top:1px;"
backgroundStyle="padding:8px 4px 8px 4px;border:1px solid red;"
backgroundSize="width:100px;height:5px;"
backgroundSrc="../../src/widget/templates/images/blank.gif"
progressBackgroundSrc="../../src/widget/templates/images/slider-bg.gif"
handleStyle="top:0px;width:13px;height:18px;"
handleSrc="../../src/widget/templates/images/slider.gif"
style="border:solid blue;border-width:16px 12px 8px 4px;padding:4px 8px 12px 16px;margin:9px;"
></div>
Change History (7)
Milestone: |
→ 0.5
|
Owner: |
changed from bill to Douglas Hays
|
Milestone: |
0.9 →
0.9beta
|
Owner: |
changed from Douglas Hays to cathy
|
Component: |
Widgets →
Dijit
|
Owner: |
changed from cathy to Douglas Hays
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Component: |
Dijit →
Dijit - Form
|
This will probably be fixed when the new slider calls superclass.setValue which emits onValueChanged events only when the value changes.