I am getting a javascript error, "this.element.scrolls is null or not an object", whenever I disabled the navigation control. This is only happening on IE 7, not Firefox. Here are the steps how this error is generated.
Zoom to an map location --> click on a button to disable/destroy the navigation's ZoomWheel (see below code) --> Click on the map and scroll the wheel up and down.
I tried to handle the mouse wheel error by using the window's event listerner without any success. window.addEventListener('DOMMouseScroll', wheel, false);.
JAVASCRIPT: function disableNav() {
var navigation = map.getControlsByClass("OpenLayers.Control.Navigation")[0];
if (navigation != null) {
navigation.disableZoomWheel();
navigation.dragPan.deactivate();
navigation.dragPan.wheelListener = null;
}
var ZoomBar = map.getControlsByClass("OpenLayers.Control.PanZoomBar")[0];
if (ZoomBar != null) {
ZoomBar.destroy();
wheelListener = null;
} }