Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: Bugs

Reply
 
Thread Tools
  #1  
Old 08-05-2008, 10:05 AM
Jacka Jacka is offline
Ext User
 
Join Date: Apr 2007
Location: Bodenwerder (Germany)
Posts: 37
Jacka is on a distinguished road
Default [2.2][FIXED] Combobox position failure (hideTrigger)

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.
Attached Images
File Type: jpg 2008_08_05_ Combobox_Ext.JPG (24.2 KB, 190 views)
Reply With Quote
  #2  
Old 08-05-2008, 04:10 PM
brian.moeskau's Avatar
brian.moeskau brian.moeskau is offline
Ext JS Contributor
 
Join Date: Mar 2007
Location: Austin, Texas
Posts: 3,258
brian.moeskau is on a distinguished road
Default

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);
        }
    }
});
__________________
Brian Moeskau
FAQ / Tutorials / User Extensions / Enhanced Forum Search

Last edited by brian.moeskau; 08-06-2008 at 01:49 AM.. Reason: Fixed as mentioned by Condor
Reply With Quote
  #3  
Old 08-05-2008, 04:23 PM
brian.moeskau's Avatar
brian.moeskau brian.moeskau is offline
Ext JS Contributor
 
Join Date: Mar 2007
Location: Austin, Texas
Posts: 3,258
brian.moeskau is on a distinguished road
Default

Fixed in SVN, thanks.
__________________
Brian Moeskau
FAQ / Tutorials / User Extensions / Enhanced Forum Search
Reply With Quote
  #4  
Old 08-06-2008, 01:39 AM
Yak52 Yak52 is offline
Ext User
 
Join Date: Dec 2007
Posts: 6
Yak52 is on a distinguished road
Default

The 'DateFiled' is have a such problem if the 'hideTrigger' is set on true.
Reply With Quote
  #5  
Old 08-06-2008, 01:44 AM
Condor's Avatar
Condor Condor is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: The Netherlands
Posts: 14,249
Condor is on a distinguished road
Default

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);
        }
    }
});
(SVN is correct)
Reply With Quote
  #6  
Old 08-06-2008, 01:49 AM
brian.moeskau's Avatar
brian.moeskau brian.moeskau is offline
Ext JS Contributor
 
Join Date: Mar 2007
Location: Austin, Texas
Posts: 3,258
brian.moeskau is on a distinguished road
Default

Oops

Yes, it applies to all TriggerFields. I even had the superclass call correct...
__________________
Brian Moeskau
FAQ / Tutorials / User Extensions / Enhanced Forum Search
Reply With Quote
  #7  
Old 08-06-2008, 03:23 AM
Jacka Jacka is offline
Ext User
 
Join Date: Apr 2007
Location: Bodenwerder (Germany)
Posts: 37
Jacka is on a distinguished road
Default [2.2][FIXED] Combobox position failure (hideTrigger)

Thank you!

Kind regards,
Jacka
Reply With Quote
  #8  
Old 09-04-2008, 07:14 AM
Zecc's Avatar
Zecc Zecc is offline
Ext User
 
Join Date: Sep 2008
Posts: 4
Zecc is on a distinguished road
Default

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.
Attached Images
File Type: png Combo.png (6.0 KB, 160 views)
Reply With Quote
  #9  
Old 09-04-2008, 01:28 PM
bobvandell bobvandell is offline
Ext User
 
Join Date: Sep 2007
Posts: 9
bobvandell is on a distinguished road
Default Extremely helpful.

Any one know the cause for this bug? (Thanks for the fix)
Reply With Quote
  #10  
Old 09-16-2008, 11:13 AM
mmusson mmusson is offline
Ext JS Premium Member
 
Join Date: Nov 2007
Location: Centreville, VA
Posts: 58
mmusson is on a distinguished road
Default

Quote:
Originally Posted by bobvandell View Post
Any one know the cause for this bug? (Thanks for the fix)
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.
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 09:49 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.