OpenLayers OpenLayers

Changeset 1423

Show
Ignore:
Timestamp:
09/08/06 17:31:42 (2 years ago)
Author:
euzuro
Message:

only prevent event from falling through if there are actually listeners registered. this fixes #247

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Events.js

    r1408 r1423  
    22 * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full 
    33 * text of the license. */ 
    4   
     4 
    55/** 
    66 * @class 
     
    160160        // execute all callbacks registered for specified type 
    161161        var listeners = this.listeners[type]; 
    162         if (listeners != null) { 
     162        if ((listeners != null) && (listeners.length > 0)) { 
    163163            for (var i = 0; i < listeners.length; i++) { 
    164164                var callback = listeners[i];