From 8305808bee5894215a3a548b1e117f4ceffefcac Mon Sep 17 00:00:00 2001 From: euzuro Date: Fri, 8 Sep 2006 21:31:42 +0000 Subject: [PATCH] only prevent event from falling through if there are actually listeners registered. this fixes #247 git-svn-id: http://svn.openlayers.org/trunk/openlayers@1423 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Events.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index 59306c943e..db979b4874 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -1,7 +1,7 @@ /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * text of the license. */ - + /** * @class */ @@ -159,7 +159,7 @@ OpenLayers.Events.prototype = { // execute all callbacks registered for specified type var listeners = this.listeners[type]; - if (listeners != null) { + if ((listeners != null) && (listeners.length > 0)) { for (var i = 0; i < listeners.length; i++) { var callback = listeners[i]; var continueChain;