From: Alan Date: Mon, 13 Nov 2023 03:09:45 +0000 (+0800) Subject: fix #7877 - caption handling of images X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=369d727f79142aac356fc52e91b20c02ad77ff5c fix #7877 - caption handling of images --- diff --git a/Roo/bootstrap/form/Input.js b/Roo/bootstrap/form/Input.js index 9cdfb5962d..11a676ce8c 100644 --- a/Roo/bootstrap/form/Input.js +++ b/Roo/bootstrap/form/Input.js @@ -929,7 +929,7 @@ Roo.extend(Roo.bootstrap.form.Input, Roo.bootstrap.Component, { } - this.el.removeClass([this.invalidClass, 'is-invalid']); + this.inputEl().removeClass([this.invalidClass, 'is-invalid']); if(this.hasFeedback && this.inputType != 'hidden'){ diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index ce59584fbc..a7d3d5be31 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -13210,7 +13210,7 @@ Roo.extend(Roo.bootstrap.form.Input, Roo.bootstrap.Component, { } - this.el.removeClass([this.invalidClass, 'is-invalid']); + this.inputEl().removeClass([this.invalidClass, 'is-invalid']); if(this.hasFeedback && this.inputType != 'hidden'){ diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 2468e931aa..516705e63d 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -560,7 +560,7 @@ A.update('');A.hide();}}},getName:function(){return this.name;},getValue:functio },selectText:function(A,B){var v=this.getRawValue();if(v.length>0){A=A===undefined?0:A;B=B===undefined?v.length:B;var d=this.inputEl().dom;if(d.setSelectionRange){d.setSelectionRange(A,B);}else if(d.createTextRange){var C=d.createTextRange();C.moveStart("character",A); C.moveEnd("character",v.length-B);C.select();}}},setValue:function(v){this.value=v;if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);this.validate();}},preFocus:function(){if(this.selectOnFocus){this.inputEl().dom.select();}},filterKeys:function(e){var k=e.getKey(); if(!Roo.isIE&&(e.isNavKeyPress()||k==e.BACKSPACE||(k==e.DELETE&&e.button==-1))){return;}var c=e.getCharCode(),cc=String.fromCharCode(c);if(Roo.isIE&&(e.isSpecialKey()||!cc)){return;}if(!this.maskRe.test(cc)){e.stopEvent();}},clearInvalid:function(){if(!this.el||this.preventMark){return; -}this.el.removeClass([this.invalidClass,'is-invalid']);if(this.hasFeedback&&this.inputType!='hidden'){var A=this.el.select('.form-control-feedback',true).first();if(A){this.el.select('.form-control-feedback',true).first().removeClass(this.invalidFeedbackClass); +}this.inputEl().removeClass([this.invalidClass,'is-invalid']);if(this.hasFeedback&&this.inputType!='hidden'){var A=this.el.select('.form-control-feedback',true).first();if(A){this.el.select('.form-control-feedback',true).first().removeClass(this.invalidFeedbackClass); A.update('');A.hide();}}if(this.indicator){this.indicator.removeClass('visible');this.indicator.addClass(this.indicatorpos=='right'?'hidden':'invisible');}this.fireEvent('valid',this);},markValid:function(){if(!this.el||this.preventMark){return;}this.el.removeClass([this.invalidClass,this.validClass]); this.inputEl().removeClass(['is-valid','is-invalid']);var A=this.el.select('.form-control-feedback',true).first();if(A){this.el.select('.form-control-feedback',true).first().removeClass([this.invalidFeedbackClass,this.validFeedbackClass]);A.update('');A.hide(); }if(this.indicator){this.indicator.removeClass('visible');this.indicator.addClass(this.indicatorpos=='right'?'hidden':'invisible');}if(this.disabled){return;}if(this.allowBlank&&!this.getRawValue().length){return;}if(Roo.bootstrap.version==3){this.el.addClass(this.validClass);