diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index 730eefdaa6..33459aade3 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -197,8 +197,8 @@ OpenLayers.Control.PanZoomBar.prototype = if (!Event.isLeftClick(evt)) return; if (this.zoomStart) { this.div.style.cursor="default"; - this.map.events.remove("mousemove"); - this.map.events.remove("mouseup"); + this.map.events.unregister("mouseup", this, this.passEventToSlider); + this.map.events.unregister("mousemove", this, this.passEventToSlider); var deltaY = this.zoomStart.y - evt.xy.y this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight)); this.moveZoomBar();