Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: [FIXED][3.0rc2] IE setHeight

    You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext User heidtmare's Avatar
    Join Date
    Mar 2007
    Location
    The Space Coast, FL
    Posts
    307
    Vote Rating
    0
      0  

    Default [FIXED][3.0rc2] IE setHeight

    PHP Code:
      Invalid argument.  ext-all-debug.jsline 3714 character 13 
    PHP Code:
    setHeight : function(heightanimate){
                var 
    me this;
                
    height me.adjustHeight(height);
                !
    animate || !me.anim // <--  line 3714
                    
    me.dom.style.height me.addUnits(height) :
                    
    me.anim({height : {to height}}, me.preanim(arguments1));
                return 
    me;
            }, 
    I dont have much to work with...i HATE debuging IE!
    All is well in FF.
    I like it. Simple, easy to remember.
    ...but why is the rum gone?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,382
    Vote Rating
    858
      0  

    Default

    More info please, what are you doing that causes this to occur?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User heidtmare's Avatar
    Join Date
    Mar 2007
    Location
    The Space Coast, FL
    Posts
    307
    Vote Rating
    0
      0  

    Default

    i think ive found a deplication example:

    PHP Code:
    new Ext.Viewport({
        
    items:[{
            
    xtype'tabpanel',
            
    activeTab:0,
            
    items:[{
                
    xtype'form',
                
    title:'FormTab',
                
    buttons: [{
                    
    text'BtnText'
                
    }]
            }]
        }]
    }); 
    the above works great in FF but makes IE flip out.
    This causes 2 setHeight errors.
    Removing the btn makes them go away.


    EDIT: I just confirmed that commenting out the buttons in my actual application fixed the problem...
    but i am quite fond of those buttons and would like to put them back ;p
    I like it. Simple, easy to remember.
    ...but why is the rum gone?

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    What happens if you add a layout manager to the Viewport such as layout: 'fit'?
    Aaron Conran
    @aconran

  5. #5
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    8
      0  

    Default

    Here's some more basic test cases that reveal another issue (see notes about buttonAlign...mentioned this in separate bug report):

    Code:
    Ext.onReady(function(){
    
        new Ext.Panel({
            title:'Panel 1 setHeight Problem',
            width:300,height:300,
            renderTo: document.body,
            layout:'fit',
            items: [{
                xtype: 'tabpanel',
                activeTab: 0,
                items: [{
    /*
                    xtype: 'panel',
                    title: 'FormTab',
                    buttons: [{
                        text: 'BtnText' // button is right aligned
                    }]
                },
                {
    // specifying panel is ok
    */
                    //specifying form causes setHeight issue
                    xtype: 'form',
                    title: 'FormTab',
                    buttons: [{
                        text: 'BtnText'  // button is centered
                    }]
                }]
            }]
        });
    
        new Ext.Panel({
            title:'Panel 2 ok except button alignment',
            width:300,height:300,
            renderTo: document.body,
            layout:'fit',
            items: [{
                xtype: 'tabpanel',
                activeTab: 0,
                items: [{
                    xtype: 'panel',
                    title: 'FormTab',
                    buttons: [{
                        text: 'BtnText' // button is right aligned
                    }]
                },{
                    xtype: 'form',
                    title: 'FormTab',
                    buttons: [{
                        text: 'BtnText'  // button is centered
                    }]
                }]
            }]
        });
    
    
        new Ext.Panel({
            title:'Panel 3 ok',
            width:300,height:300,
            renderTo: document.body,
            layout:'fit',
            items: [{
                    xtype: 'form',
                    title: 'FormTab',
                    buttons: [{
                        text: 'BtnText'
                    }]
            }]
        });
    
    });
    FOr whatever reason, one of the early passes of setHeight, when it's a form, has a height of -9.

    So I did this:
    Code:
             setHeight : function(height, animate){
                var me = this;
                height = me.adjustHeight(height);
                if (height<0){height=0;}
                !animate || !me.anim ? 
                    me.dom.style.height = me.addUnits(height) :
                    me.anim({height : {to : height}}, me.preanim(arguments, 1));
                return me;
            },
    And the problem went away. Is there a scenario to set a negative height (or width?) ?

  6. #6
    Ext User
    Join Date
    Dec 2007
    Posts
    13
    Vote Rating
    0
      0  

    Default

    I made the same changes to setWidth too and used Ext coding standard.

    Code:
         setWidth : function(width, animate){
            var me = this;
            width = me.adjustWidth(width);
            // @change: Cause in IE width is sometimes less than 0.
            width = width < 0 ? 0 : width;
            // @changeend
            !animate || !me.anim ?
                me.dom.style.width = me.addUnits(width) :
                me.anim({width : {to : width}}, me.preanim(arguments, 1));
            return me;
        },
    
    
         setHeight : function(height, animate){
            var me = this;
            height = me.adjustHeight(height);
            // @change: Cause in IE height is sometimes less than 0.
            height = height < 0 ? 0 : height;
            // @changeend
            !animate || !me.anim ?
                me.dom.style.height = me.addUnits(height) :
                me.anim({height : {to : height}}, me.preanim(arguments, 1));
            return me;
        },

  7. #7
    Ext User
    Join Date
    Mar 2009
    Location
    France, Paris
    Posts
    23
    Vote Rating
    0
      0  

    Question Will be fixed ?

    Hi,

    In my application I had the same issue in IE8 (width was for some reason set to -3.8). Using the fix of Worthy worked but is it something that will be included in the next release of Ext 3 ?
    Thanks anyway

    Sylvain

  8. #8
    Ext User heidtmare's Avatar
    Join Date
    Mar 2007
    Location
    The Space Coast, FL
    Posts
    307
    Vote Rating
    0
      0  

    Default

    using the worthy / mjlecomte suggested fix did in fact solve my original issue.
    I like it. Simple, easy to remember.
    ...but why is the rum gone?

  9. #9
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    The negative setHeight/setWidth's should not be occurring. We are debugging why they are being sent into this function.
    Aaron Conran
    @aconran

  10. #10
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    Duplicate of this bug.

    ps. The negative height was coming from the syncHeight function (fix).

Page 1 of 2 12 LastLast

Posting Permissions

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