Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#1878 closed defect (fixed)

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

Reported by: [email protected] Owned by: Douglas Hays
Priority: high Milestone: 0.9beta
Component: Dijit - Form Version: 0.4
Keywords: Cc: davidb
Blocked By: Blocking:


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"
   	onValueChanged="dojo.debug ('onValueChanged: ' + arguments[0]);"
	backgroundStyle="padding:8px 4px 8px 4px;border:1px solid red;"
	style="border:solid blue;border-width:16px 12px 8px 4px;padding:4px 8px 12px 16px;margin:9px;"

Change History (7)

comment:1 Changed 15 years ago by bill

Milestone: 0.5
Owner: changed from bill to Douglas Hays

comment:2 Changed 15 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 15 years ago by bill

Component: WidgetsDijit

comment:4 Changed 15 years ago by Douglas Hays

Owner: changed from cathy to Douglas Hays

comment:5 Changed 15 years ago by davidb

Cc: davidb added

comment:6 Changed 15 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 11 years ago by bill

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