From dea7438850122b93054d43f03027f325891b2d0d Mon Sep 17 00:00:00 2001 From: ejn Date: Mon, 28 Jan 2013 10:14:51 +0100 Subject: [PATCH] Clear cached mousedown/up positions used for distinguishing between drag and click in feature handler after a click event. Fixes #856 --- lib/OpenLayers/Handler/Feature.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index 63d64b1f63..a3f2d4ae82 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -353,6 +353,11 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { if(dpx <= this.clickTolerance) { this.callback(key, args); } + // we're done with this set of events now: clear the cached + // positions so we can't trip over them later (this can occur + // if one of the up/down events gets eaten before it gets to us + // but we still get the click) + this.up = this.down = null; } else { this.callback(key, args); }