Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Oct 2009
    Posts
    80
    Vote Rating
    0
    squ3lch is on a distinguished road

      0  

    Default [FIXED-776][3.2 rc1]CompositeField First Field Width in IE7

    [FIXED-776][3.2 rc1]CompositeField First Field Width in IE7


    Ext version tested:
    • Ext 3.2 rc1


    Adapter used:
    • ext
    • prototype


    css used:
    • only default ext-all.css




    Browser versions tested against:
    • IE7
    • FF3


    Operating System:
    • WinXP Pro


    Description:
    • In IE7, an "Invalid Argument" error is thrown when the first subfield in a CompositeField does not have a width specified. Firefox works correctly.


    Test Case:

    Code:
    Ext.onReady(function(){
    
         var f1 = new Ext.form.CompositeField({
                        labelWidth:50,
                        width:300,
                        fieldLabel:'f1',
                        hidden:true,
                        items:[
                             c1 = new Ext.form.TextField({
                                  value:'test'
    //                            ,width:75   // UNCOMMENT TO FIX
                             }),
                             t1 = new Ext.Button({
                                  text:'Test'
                             })
                        ]
                   });
    
         var b1 = new Ext.Button({
              text:'Show',
              handler:function(){
                   f1.show();
                   p1.doLayout();
              }
         });
    
         var p1 = new Ext.Panel({
              id: 'card-0',
              items:[
                   f1,
                   b1
              ]
         });
    
        var mainWindow = new Ext.Viewport({
            layout:'absolute',
            defaults:{x:10,y:5,anchor:"-10 -10",plain:true},
            items:[
                   p1
            ]
        });
    
        mainWindow.doLayout();
    
    });

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Yes, the error is incorrect behavior.

    However, I would like to note that CompositeField uses a hbox layout, which requires either a 'width' or a 'flex' config option to be present in the items. If you specify neither the sizing will be unpredictable.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Quote Originally Posted by Condor View Post
    Yes, the error is incorrect behavior.

    However, I would like to note that CompositeField uses a hbox layout, which requires either a 'width' or a 'flex' config option to be present in the items. If you specify neither the sizing will be unpredictable.
    This is no longer true in 3.2.x.

  4. #4
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    [type]: fix
    [module]: BoxLayout
    [id]: #776
    [desc]: Fixes #776. Check added to make sure positioning is not attempted if a position value is NaN.

Thread Participants: 2