Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11503 closed defect (fixed)

dojox.form.RangeSlider - Max-Slider Mouseclick

Reported by: Ferdinand Weinberger Owned by: dante
Priority: high Milestone: 1.5.1
Component: DojoX Form Version: 1.5
Keywords: dojox rangeslider Cc:
Blocked By: Blocking:


the max-slider of the rangesliders can only be moved by scroll and keyboard. if you click on it it will not move and the console will throw an error "widget is undefined.." best example is the testpage:

i found a workaround, but maybe the whole widget should be checked by its creator.

by adding the line dijit.form._SliderMoverMax.prototype.widget = _self; to line 30 of dojox/form/RangeSlider.js it seems to be solved

Line 27 - 34

			// define a custom constructor for a SliderMoverMax that points back to me
			var _self = this;
			var mover = function(){
				dijit.form._SliderMoverMax.prototype.widget = _self;
				dijit.form._SliderMoverMax.apply(this, arguments);
				this.widget = _self;
			dojo.extend(mover, dijit.form._SliderMoverMax.prototype);

Change History (4)

comment:1 Changed 11 years ago by jcline

Dragging the whole silder also generates an exception. A similar fix needs to be made a few lines lower:

On line 41 add

dijit.form._SliderBarMover.prototype.widget = _self;

like this:

	var barMover = function(){
				dijit.form._SliderBarMover.prototype.widget = _self;
				dijit.form._SliderBarMover.apply(this, arguments);
				this.widget = _self;

Also the code is using a non-existant function: dijit.form._FormValueWidget.prototype._onKeyPress.apply(this, arguments); in the _onKeyPress function. Whenever you type a key that isn't handled by the RangSilder? you get an error. I just commented out the call and there didn't seem to be any negative effects. If its still needed then an alternate function needs to be found.

comment:2 Changed 11 years ago by Nick Fenwick

Close this bug? Fixed in #11714

comment:3 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

comment:4 Changed 11 years ago by Eugene Lazutkin

Milestone: tbd1.5.1
Note: See TracTickets for help on using tickets.