CableDawg
13 Aug 2008, 5:25 AM
If you create a ComboBox with a hidden trigger, the element is rendered off the page in IE due to the following code:
afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
var y;
if(Ext.isIE && this.el.getY() != (y = this.trigger.getY())){
this.el.position();
this.el.setY(y);
}
}
I assume this has to do with aligning the INPUT element with the trigger IMG which is great, but when the trigger IMG is hidden, the getY call can return an unexpected value. In my case, the INPUT was getting rendered with a top value of -172px which made it invisible.
The proposed fix is as follows:
afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
var y;
if(Ext.isIE && !this.hideTrigger && (this.el.getY() != (y = this.trigger.getY()))){
this.el.position();
this.el.setY(y);
}
}
I have not tested this issue in IE7 or IE8.
afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
var y;
if(Ext.isIE && this.el.getY() != (y = this.trigger.getY())){
this.el.position();
this.el.setY(y);
}
}
I assume this has to do with aligning the INPUT element with the trigger IMG which is great, but when the trigger IMG is hidden, the getY call can return an unexpected value. In my case, the INPUT was getting rendered with a top value of -172px which made it invisible.
The proposed fix is as follows:
afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
var y;
if(Ext.isIE && !this.hideTrigger && (this.el.getY() != (y = this.trigger.getY()))){
this.el.position();
this.el.setY(y);
}
}
I have not tested this issue in IE7 or IE8.