Opened 13 years ago

Closed 12 years ago

Last modified 9 years ago

#1878 closed defect (fixed)

Slider Widget using snapValues will call "onValueChanged" when the value has not changed

Reported by: mdknapp@… Owned by: Douglas Hays
Priority: high Milestone: 0.9beta
Component: Dijit - Form Version: 0.4
Keywords: Cc: davidb
Blocked By: Blocking:

Description

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)

comment:1 Changed 13 years ago by bill

Milestone: 0.5
Owner: changed from bill to Douglas Hays

comment:2 Changed 13 years ago by Douglas Hays

Milestone: 0.90.9beta
Owner: changed from Douglas Hays to cathy

This will probably be fixed when the new slider calls superclass.setValue which emits onValueChanged events only when the value changes.

comment:3 Changed 12 years ago by bill

Component: WidgetsDijit

comment:4 Changed 12 years ago by Douglas Hays

Owner: changed from cathy to Douglas Hays

comment:5 Changed 12 years ago by davidb

Cc: davidb added

comment:6 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [9313]) Fixes #2813, #1878, #2787. Created new 0.9 sider. Still needs css and a11y tweaking and tick mark support.

comment:7 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.