diff --git a/lib/OpenLayers/Control/Zoom.js b/lib/OpenLayers/Control/Zoom.js index e7657a27b3..19ca4532a0 100644 --- a/lib/OpenLayers/Control/Zoom.js +++ b/lib/OpenLayers/Control/Zoom.js @@ -126,11 +126,11 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { */ destroy: function() { if (this.zoomInLink) { - delete this.zoomInLink.onclick; + this.zoomInLink.onclick = null; delete this.zoomInLink; } if (this.zoomOutLink) { - delete this.zoomOutLink.onclick; + this.zoomOutLink.onclick = null; delete this.zoomOutLink; } OpenLayers.Control.prototype.destroy.apply(this); diff --git a/tests/Control/Zoom.html b/tests/Control/Zoom.html new file mode 100644 index 0000000000..7f329446b9 --- /dev/null +++ b/tests/Control/Zoom.html @@ -0,0 +1,74 @@ + + +
+ + + + + + + diff --git a/tests/list-tests.html b/tests/list-tests.html index 09684ef764..6fe622d95b 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -45,6 +45,7 @@