diff --git a/lib/OpenLayers/Handler/MouseWheel.js b/lib/OpenLayers/Handler/MouseWheel.js index 5167056de7..1f3ef19494 100644 --- a/lib/OpenLayers/Handler/MouseWheel.js +++ b/lib/OpenLayers/Handler/MouseWheel.js @@ -111,7 +111,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { var overMapDiv = false; var elem = OpenLayers.Event.element(e); - while((elem != null) && !overMapDiv && !overScrollableDiv) { + while(elem && (elem.nodeType == 1) && !overMapDiv && !overScrollableDiv) { if (!overScrollableDiv) { try {