[OpenLayers-Dev] firefox events problem

Christopher Schmidt crschmidt at metacarta.com
Thu Dec 20 08:12:47 EST 2007

On Thu, Dec 20, 2007 at 04:07:54PM +0800, li ethan wrote:
> Dear listers!
>       I have a problem about trigger event on firefox2.0, Currently I'm
> using openlayers-2.5,and construct a marker like this:
>                var marker = new OpenLayers.Marker(lonlat);
>                marker1.events.register("mouseover", marker1, function(evt) {
>                   alert("test");
>                   Event.stop(evt); });
>                markers.addMarker(marker1);
> when I use IE7,there is no problem,I can see the alert window,but when I use
> firefox2.0,it seems like the event never fired,nothing happend on the
> screen.Did anyone encounter the same problem,or it's just my code's
> problem,Am I missing anything about events.Thanks for any kind of help!

Comment #1: "Event.stop()" is old and bad. Use OpenLayers.Event.stop()
if you need to do this.

Now, to your question: I have no exprience that would indicate that this
doesn't work, and believe I've done something similar before. can you
produce a reduced test case that you can share as an HTML file?

Christopher Schmidt

More information about the Dev mailing list