Results 1 to 9 of 9

Thread: [2.3.0] IE7 Accordion bug

  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
    720
    Vote Rating
    36
      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,385
    Vote Rating
    858
      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!

  7. #7
    Touch Premium Member letssurf's Avatar
    Join Date
    Jan 2008
    Location
    Northampton, UK
    Posts
    88
    Vote Rating
    1
      0  

    Default

    I'm seeing the same problem. The fix also worked for me.

    Also might I suggest only applying the override if it is IE.
    Code:
    if(Ext.isIE7) {
        Ext.override(Ext.Element, {
          getHeight : function(contentHeight){
                var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight) || 0;
                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;
                w = this.dom.offsetWidth || 0;
                w = contentWidth !== true ? w : w-this.getBorderWidth("lr")-this.getPadding("lr");
                return w < 0 ? 0 : w;
            }
        });
    }
    James Demspter

    the one constant in life, is change.

  8. #8
    Sencha User
    Join Date
    Sep 2008
    Posts
    63
    Vote Rating
    0
      0  

    Default

    Any chance to get a bug fix release for those that have paid for the license?

  9. #9
    Sencha User
    Join Date
    Sep 2008
    Posts
    63
    Vote Rating
    0
      0  

    Default

    For instance this problem affects also IE6, I've just tested it.

Posting Permissions

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