PDA

View Full Version : [2.2][DUP][FIXED] hideTrigger css issue



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);
}
}
}
});

Condor
10 Aug 2008, 9:41 PM
This is a duplicate of this post (http://extjs.com/forum/showthread.php?t=43231).

danh2000
10 Aug 2008, 10:14 PM
Ok thanks... and sorry about that, I did search first - I dunno how you find em so quick!