diff --git a/lib/OpenLayers/Handler/Click.js b/lib/OpenLayers/Handler/Click.js index 744d412f2e..3fb0f3748f 100644 --- a/lib/OpenLayers/Handler/Click.js +++ b/lib/OpenLayers/Handler/Click.js @@ -515,6 +515,8 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, { this.clearTimer(); this.down = null; this.first = null; + this.last = null; + this.touch = false; deactivated = true; } return deactivated; diff --git a/tests/Handler/Click.html b/tests/Handler/Click.html index 2dada5c7f5..41172cd896 100644 --- a/tests/Handler/Click.html +++ b/tests/Handler/Click.html @@ -410,7 +410,7 @@ } function test_Handler_Click_deactivate(t) { - t.plan(4); + t.plan(6); var control = { map: new OpenLayers.Map('map') }; @@ -422,6 +422,8 @@ handler.active = true; handler.down = true; handler.timerId = true; + handler.touch = true; + handler.last = true; deactivated = handler.deactivate(); t.ok(deactivated, "deactivate returns true if the handler was active already"); @@ -429,6 +431,11 @@ "deactivate sets down to null"); t.eq(handler.timerId, null, "deactivate sets timerId to null"); + t.eq(handler.touch, false, + "deactivate sets touch to false"); + t.eq(handler.last, null, + "deactivate sets last to null"); + } function test_Handler_Click_mouseup(t) {