|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
A single Combobox will be displayed on the top of the page, if 'hideTrigger' is set on true.
With 'false' it works normal. Tested IE 6.0 and IE 7. Firefox 3 works normal. |
|
#2
|
||||
|
||||
|
Try this:
Ext.form.TriggerField.override({
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);
}
}
});
Last edited by brian.moeskau; 08-06-2008 at 01:49 AM.. Reason: Fixed as mentioned by Condor |
|
#3
|
||||
|
||||
|
Fixed in SVN, thanks.
|
|
#4
|
|||
|
|||
|
The 'DateFiled' is have a such problem if the 'hideTrigger' is set on true.
|
|
#5
|
||||
|
||||
|
The fix listed above is wrong. It should be:
Ext.form.TriggerField.override({
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);
}
}
});
|
|
#6
|
||||
|
||||
|
Oops
![]() Yes, it applies to all TriggerFields. I even had the superclass call correct... ![]() |
|
#7
|
|||
|
|||
|
Thank you!
![]() Kind regards, Jacka |
|
#8
|
||||
|
||||
|
Yes, thank you!
It's interesting how I found this thread exactly after I was preparing to drop the hideTrigger: true from my code... ![]() Of course, now I need to discover why this is happening: Edit: ah, I've found a quickfix in another thread. |
|
#9
|
|||
|
|||
|
Any one know the cause for this bug? (Thanks for the fix)
|
|
#10
|
|||
|
|||
|
Yes, it is straightforward. The trigger element is hidden with a call to Element setDisplayed(false). This has the effect of setting the CSS style display:none. This removes the element from the HTML layout.
The IE specific code above is getting the y position of the trigger element. The y position of the trigger element is 0 when it has the CSS style display:none causing the text part of the trigger field to be incorrectly positioned. Adding a check for hideTrigger keeps the code from running in this case and causing problems. |
![]() |
| Thread Tools | |
|
|