Ticket #2384 (closed bug: fixed)
PanZoomBar slider bug winxp IE6+, firefox 3+
|Reported by:||sowee||Owned by:||crschmidt|
Once the slider has been dragged at least one time, if you click on the zoom bar to set the zoom to a specific level, the slider is sometimes misplaced.
What happens is that once a drag is made, the variable zoomStart is set and it looks like it's never set to null. When the user then clicks on the zoombar, the divClick handler is executed onMouseDown and since this method moves the slider to the zoom level clicked - under the mouse cursor -, when the user releases the mouse button the mouseup event of the slider occurs and zoomBarUp is called. However, the zoomBarUp handler executes its code if zoomStart is not null, which is always the case once a drag has been made. The code then moves the slider again depending on the cursor relative position.
My fix is to simple put "this.zoomStart = null;" just before "OpenLayers.Event.stop(evt);" in the handler "zoomBarUp". In my case, it fixes the problem.