#4668 closed defect (worksforme)
Programmatic slider does not work correctly
Reported by: | guest | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit - Form | Version: | 0.9 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
I have already reported this in a forum posting (http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-support/programatic-vertical-slider-creation).
I am using 0.9.0 final. When a slider (I tried vertical only), is created through code, some features work and some don't.
What works:
- Displays correctly (didn't try labels).
- Clicking on individual values on slider fires onChange event.
What doesn't work:
- onChange event not fired when using +/- buttons.
- Unable to drag control button to change value.
- Mouse wheel moves control button up/down, but does not fire onChange events.
Change History (6)
comment:1 Changed 13 years ago by
Owner: | set to Douglas Hays |
---|
comment:2 Changed 13 years ago by
Milestone: | → 1.0 |
---|---|
severity: | critical → major |
comment:3 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:4 Changed 13 years ago by
I am currently still using 0.9 final. Creating the slider programmatically has the issues I listed originally. With the following changes, the +/- buttons and the mouse wheel work. Can someone please validate these changes?
_bumpValue: function(signedChange){ ...; this.setValue(value); }
to
_bumpValue: function(signedChange, priorityChange) { ...; this.setValue(value, priorityChange); }
Also
increment/decrement: function(...) { _bumpValue(..., true); }
comment:5 Changed 13 years ago by
Sorry for another post. Setting slider.intermediateChanges = true fixed my issues. I don't need the above changes.
thanks Jayant
comment:6 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
The following seems to work correctly using the current dijit trunk:
In 0.9 final, the arrow keys do not fire onChange events until an onBlur event is received by the widget, unless you specify intermediateChanges: true
In 1.0, the arrow keys fire onChange independently of this boolean attribute.
Also, make sure that programmatic widget creation is inside a dojo.addOnLoad call since require calls are asynchronous.