[OpenLayers-Dev] Pb with IE - Events click and mousedown

Schuyler Erle sderle at metacarta.com
Tue Mar 20 13:43:33 EDT 2007


On Tue, 2007-03-20 at 18:14 +0100, Sylvain Beorchia wrote:
> 
> Using events in OpenLayers, i'm setting these settings :
> 
>    map.events.register("click", map, queryMap);
>    map.events.register("mousedown", map, clickOnMap);
> 
> 
> It works fine on firefox. When i click, querymap is called, and not
> clickOnMap. When i start to drag the map clickOnMap is called ok.
> 
> But under IE, queryMap is always called. I mean, when i start to grad
> the map and then release the mouse button, the "click" event is fired.

I think you need to make sure that you call OpenLayers.Event.stop(evt)
in your clickOnMap handler, so that the event doesn't fall through to
the browser default behavior. Try it?

SDE




More information about the Dev mailing list