Roo/Element.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 9 Feb 2011 07:58:44 +0000 (15:58 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 9 Feb 2011 07:58:44 +0000 (15:58 +0800)
Roo/Element.js

index e3ae5c5..d9f65c6 100644 (file)
@@ -1135,7 +1135,9 @@ if(opt.anim.isAnimated()){
          * @param {Object}   options   (optional)An object with standard {@link Roo.EventManager#addListener} options
          */
         addListener : function(eventName, fn, scope, options){
-            Roo.EventManager.on(this.dom,  eventName, fn, scope || this, options);
+            if (this.dom) {
+                Roo.EventManager.on(this.dom,  eventName, fn, scope || this, options);
+            }
         },
 
         /**