Results 1 to 9 of 9

Thread: [2.3.0] IE7 Accordion bug

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext JS Premium Member
    Join Date
    May 2007
    Location
    Aalborg, Denmark
    Posts
    14
    Vote Rating
    0
      0  

    Default [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:
    • In IE7 the accordion layout hides panels below the active one.
    • 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 Attached Images

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2008
    Posts
    1
    Vote Rating
    0
      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
    723
    Vote Rating
    37
      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
      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
      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
    18,608
    Vote Rating
    874
      0  

    Default

    Using the SVN version I'm not seeing this happen. Can anyone confirm?
    Evan Trimboli
    Twitter - @evantrimboli

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •