danh2000
10 Aug 2008, 5:07 PM
Hi,
In some instances (not all), when I specify hideTrigger : true on my combo's and datefields, the field is not visible in IE6 (I've only tried IE 6 and FF 2-3) it actually gets a strange negative top css position.
You can recreate this by editing the 'Advanced VTypes' demo in the samples and adding hideTrigger : true to the startdt field.
I haven't had time to look into why this is occuring, I've just had to quickly downgrade to 2.1 for a demo.
If anyone knows a fix for this I'd appreciate you posting here.
Thanks,
Update:
It seems as though the new afterRender method that was added to 2.2 is the culprit:
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 don't know what the usecase was for adding this, but maybe only aligning the el if the triggerfield is displayed would be better: ?
Ext.override(Ext.form.TriggerField,{
afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
var y;
if (!this.hideTrigger) {
if (Ext.isIE && this.el.getY() != (y = this.trigger.getY())) {
this.el.position();
this.el.setY(y);
}
}
}
});
In some instances (not all), when I specify hideTrigger : true on my combo's and datefields, the field is not visible in IE6 (I've only tried IE 6 and FF 2-3) it actually gets a strange negative top css position.
You can recreate this by editing the 'Advanced VTypes' demo in the samples and adding hideTrigger : true to the startdt field.
I haven't had time to look into why this is occuring, I've just had to quickly downgrade to 2.1 for a demo.
If anyone knows a fix for this I'd appreciate you posting here.
Thanks,
Update:
It seems as though the new afterRender method that was added to 2.2 is the culprit:
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 don't know what the usecase was for adding this, but maybe only aligning the el if the triggerfield is displayed would be better: ?
Ext.override(Ext.form.TriggerField,{
afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
var y;
if (!this.hideTrigger) {
if (Ext.isIE && this.el.getY() != (y = this.trigger.getY())) {
this.el.position();
this.el.setY(y);
}
}
}
});