Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    May 2007
    Location
    Aalborg, Denmark
    Posts
    14
    Vote Rating
    0
    chh is on a distinguished road

      0  

    Default [2.3.0] IE7 Accordion bug

    [2.3.0] IE7 Accordion bug


    Ext version tested:
    • Ext 2.3.0

    Adapter used:
    • ext

    css used:
    • only default ext-all.css

    Browser versions tested against:
    • IE7

    Operating System:
    • WinXP Pro

    Description:
    • See screenshot. The first one is how it looks in version 2.2.1 and the second one is how it looks in 2.3.0. The problem is only in IE7, all other browsers get it right.

      The screenshots are from the examples\layout\accordion.html contained in the Ext SDK.

    Screenshot or Video:
    • attached
    Attached Images

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2008
    Posts
    1
    Vote Rating
    0
    twarberg is on a distinguished road

      0  

    Default


    Done a little bit of debugging and discovered it has to do with this fix (from the change log):

    Ext.core.Element
    • Fix getWidth/getHeight issue.

    Looks like IE7 has a bug in the 'clientWidth' dom property. I've made an quick and dirty fix, that seems to work (but might break something else!). Simply reverting to how Ext 2.2.1 did, if IE7:

    Code:
    Ext.override(Ext.Element, {
              getHeight : function(contentHeight){
                    var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight) || 0;
                    if(Ext.isIE7) {
            		h = this.dom.offsetHeight || 0;
            	}
                    h = contentHeight !== true ? h : h-this.getBorderWidth("tb")-this.getPadding("tb");
                    return h < 0 ? 0 : h;
                },
    
    
                getWidth : function(contentWidth){
                    var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth) || 0;
            	if(Ext.isIE7) {
            		    w = this.dom.offsetWidth || 0;
            	}
                    w = contentWidth !== true ? w : w-this.getBorderWidth("lr")-this.getPadding("lr");
                    return w < 0 ? 0 : w;
                }
            });
    /Tim

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    671
    Vote Rating
    0
    Dumbledore is on a distinguished road

      0  

    Default


    nice solution! But this behaviour is not only on IE7!

    I have the same problem here with IE6. And your solution works...

    Thanks,
    Dumbledore

  4. #4
    Sencha User
    Join Date
    Sep 2008
    Posts
    63
    Vote Rating
    0
    TizianoF is on a distinguished road

      0  

    Default


    I've noticed the same problem. Is there a patch from ext js?

  5. #5
    Sencha User
    Join Date
    Nov 2007
    Location
    Exeter Devon England
    Posts
    3
    Vote Rating
    0
    Sean Connelly is on a distinguished road

      0  

    Default


    Same problem here!

    Any news on a fix?

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,901
    Vote Rating
    623
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Using the SVN version I'm not seeing this happen. Can anyone confirm?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!