[OpenLayers-Dev] MouseWheel Bug

Domenico Febbo domenico.febbo at gmail.com
Tue Jun 5 03:55:30 EDT 2007


I've found a possible bug, using examples/custom-control.html page and also
using the OpenLayers Home page.
FireBug error console said this:
"evt.xy has no properties
./Control/Navigation.js
Line 67"

To reproduce this error try the following steps:
1) move mouse pointer into the map.
2) refresh web page (with F5 or Ctrl+F5) and take care to don't move the
mouse.
3) when the page is again ready try to scroll the wheelMouse (without moving
the mouse!), now the error occur.

The bad thing is that: if you don't move the mouse you don't have mouse
position when fire wheel.

The bug is located in MouseWheel.js on line 88:
"e.xy = this.mousePosition;"
because this.mousePosition is "null" on start up.

This is a Mozilla Bug.

A trivial work around is to disable wheel event
in MouseWheel.js on line 84 with this substitution:

"-             if (delta) {"
"+            if (delta && this.mousePosition) {"

The very very strange thing is an analogous bug in GMaps :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070605/25fff30d/attachment.html


More information about the Dev mailing list