diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index 82f4beb2a1..9f4b13a965 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -786,10 +786,15 @@ OpenLayers.Events = OpenLayers.Class({ * evt - {Event} */ handleBrowserEvent: function (evt) { + var type = evt.type, listeners = this.listeners[type]; + if(!listeners || listeners.length == 0) { + // none's listening, bail out + return; + } if (this.includeXY) { evt.xy = this.getMousePosition(evt); } - this.triggerEvent(evt.type, evt); + this.triggerEvent(type, evt); }, /**