Roo/bootstrap/Img.js
authorAlan Knowles <alan@roojs.com>
Tue, 20 Jul 2021 03:49:11 +0000 (11:49 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 20 Jul 2021 03:49:11 +0000 (11:49 +0800)
Roo/bootstrap/Img.js

index 0226544..5d31dff 100644 (file)
@@ -167,7 +167,14 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
         if(!this.href){
             this.el.on('click', this.onClick, this);
         }
-        this.el.select('img', true).on('load', this.onImageLoad, this);
+        if(this.src || (!this.xsUrl && !this.smUrl && !this.mdUrl && !this.lgUrl)){
+            this.el.on('loac', this.onImageLoad, this);
+            
+        } else {
+            // not sure if this works.. not tested
+            this.el.select('img', true).on('load', this.onImageLoad, this);
+        }
+        
     },
     
     onClick : function(e)