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

Sylvain Beorchia sylvain.beorchia at makina-corpus.com
Tue Mar 20 15:55:34 EDT 2007


Hi,

as a matter of fact, i forgot the OpenLayers.Event.stop(evt) in my
handlers. But it's still not working. I mean when i stop draging the
map, and release the mouse button, the OnClik() event is still fired
(only under IE).

I've tried to put the OpenLayers.Event.stop(evt) in the mousedown
handler, and in the move handler. Nothing works.

Any ideas ?

Thank you.

Sylvain Beorchia.


Schuyler Erle a e'crit :
> 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
> 
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev




More information about the Dev mailing list