PDA

View Full Version : [FIXED][3.1] Slider horizontal handle placement bug



Munter
22 Dec 2009, 5:43 AM
Hi

I just found a bug in Sliders placement of the handle when interacting with a horizontal Slider with the mouse. The handle is placed so the left edge ends where the mouseevent happened, instead of being centered where the event happened.

Just click a non-snapping slider anywhere, or drag the handle to reproduce.

Reproducable with the current Slider example page:
http://www.extjs.com/deploy/dev/examples/slider/slider.html

Tested in:


Firefox - 3.5.6
IE 6 - 6.0.2900.5512.xpsp_sp3_gdr.090804-1435
Safari - 4.0.3 (531.9.1)
Opera - 10.10 (build 1893)


Fixable with the following override with changes marked by javascript block comments:

Ext.override(Ext.Slider, {
reverseValue: function(pos) {
var ratio = this.getRatio();
return (pos + /*this.halfThumb +*/ (this.minValue * ratio)) / ratio;
}
});

--
Munter

hendricd
23 Dec 2009, 6:01 AM
Thanks for the report. Fixed in SVN.