You found a bug! We've classified it as EXTJS-11050 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    78
    Vote Rating
    3
    JeromeA is on a distinguished road

      0  

    Default Firefox left alignment is not good on label with absolute position

    Firefox left alignment is not good on label with absolute position


    REQUIRED INFORMATION




    Ext version tested:
    • Ext 4.2.x (the one used by architect 2.2.2 build 991)
    Browser versions tested against:
    • IE10
    • CHrome 29
    • FF 23.0.1
    DOCTYPE tested against:
    • ____
    Description:
    • The left alignment in FIrefox on absolute component is not right..
    Steps to reproduce the problem:
    • open my test project in architect, see what should appear
    • open my project in Chrome, see that it is normal
    • open my project in Firefox, see the difference
    The result that was expected:
    • same left position on absolute positioned label
    The result that occurs instead:
    • the left position inside Firefox is 100px more.
    Test Case:

    Code:
    Ext.require('*');
    
    Ext.onReady(function() {
    
        new Ext.window.Window({
            width: 400,
            height: 250,
            autoShow: true,
            layout: 'fit',
            title: 'Win',
            items: [{
                xtype: 'form',
                layout: {
                    align: 'stretch',
                    type: 'vbox'
                },
                bodyPadding: 10,
                title: 'My Form',
                items: [{
                    xtype: 'fieldcontainer',
                    flex: 1,
                    height: 120,
                    width: 400,
                    layout: 'absolute',
                    fieldLabel: 'Label',
                    items: [{
                        xtype: 'label',
                        x: -104,
                        y: 30,
                        height: 20,
                        width: 350,
                        text: 'My Label is not left aligning correctly, or is it....?'
                    }]
                }]
            }]
        });
    
    });
    see my attached project:
    FirefoxLeftAlignBug.zip





    HELPFUL INFORMATION




    Screenshot or Video:Debugging already done:
    • none
    Possible fix:
    • not provided
    Operating System:
    • Window 7 64 bits
    Last edited by evant; 27 Aug 2013 at 6:06 AM. Reason: Added test case

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,854
    Vote Rating
    66
    Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    78
    Vote Rating
    3
    JeromeA is on a distinguished road

      0  

    Default


    Hi,
    I found the issue for this, I think it should be include in a future fix. The Architect editor let you empty the value of fieldLabel of the FieldContainer, but the fieldLabel config stays in the code unless you use the X beside the value. If you just erase it manually without using the X, the javascript assume the label is there and that it should add 100px to the left alignment.

    BUG (add 100px to left alignment, it assume there is a field label to the field container):

    Code:
    {
        xtype: 'fieldcontainer',
        layout: {
            type: 'absolute'
        },
        fieldLabel: '',
        items: [
            {
                xtype: 'textfield',
                x: 10,
                y: 20,
                fieldLabel: 'Label'
            }
        ]
    }
    NO BUG:

    Code:
    {
        xtype: 'fieldcontainer',
        layout: {
            type: 'absolute'
        },
        items: [
            {
                xtype: 'textfield',
                x: 10,
                y: 20,
                fieldLabel: 'Label'
            }
        ]
    }

  4. #4
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    78
    Vote Rating
    3
    JeromeA is on a distinguished road

      0  

    Default


    I was a bit too quick in saying that was the cause... I still have the issue with the bad left alignment of fields, inside FieldContainer with absolute layout .

    I have been digging in the sencha ext src files for a while with no success... Does anybody at Sencha knows if there is a fix on the way for 4.2.3?

    thanks for your support.

  5. #5
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,854
    Vote Rating
    66
    Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about

      0  

    Default


    According to the bug tracker, it was fixed for 4.2.2. Are you seeing the issue in in 4.2.2?
    Get on the Fast Track with Sencha Training http://sencha.com/training

  6. #6
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    78
    Vote Rating
    3
    JeromeA is on a distinguished road

      0  

    Default


    I still have the issue in 4.2.2

    the simple example I provided Sencha was fixed by the update of 4.2.2. But I updated my big project to 4.2.2 and the alignment is still bad. I'll see if I can recreate the issue in a smaller project and then send it to the Sencha team.

  7. #7
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    78
    Vote Rating
    3
    JeromeA is on a distinguished road

      0  

    Default


    I recreated the issue with a simple project using ext 4.2.2. Here it is.

    2FirefoxLeftAlignBug.zip

    The issue is when I use a FieldContainer with an absolute layout.

    concerning my test project, I created index.html to link the 4.2.2 library, but I couldn't send the ext-all.js of 4.2.2 because it was making my zip too big for your server. You have to add it in my project to recreate the issue.

    thanks for your help

Thread Participants: 1