From: Alan Knowles Date: Tue, 20 Jul 2021 03:49:11 +0000 (+0800) Subject: Roo/bootstrap/Img.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=2e6b8c2a5ab33cb5120f249d119a8da3716c3946 Roo/bootstrap/Img.js --- diff --git a/Roo/bootstrap/Img.js b/Roo/bootstrap/Img.js index 0226544263..5d31dffa89 100644 --- a/Roo/bootstrap/Img.js +++ b/Roo/bootstrap/Img.js @@ -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)