PDA

View Full Version : [OPEN] Firefox left alignment is not good on label with absolute position



JeromeA
27 Aug 2013, 5:51 AM
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:



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:
45567





HELPFUL INFORMATION




Screenshot or Video:

attached45568
Debugging already done:

none
Possible fix:

not provided
Operating System:

Window 7 64 bits

Gary Schlosberg
27 Aug 2013, 7:44 AM
Thanks for the report! I have opened a bug in our bug tracker.

JeromeA
20 Nov 2013, 2:21 PM
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):


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

NO BUG:


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

JeromeA
21 Nov 2013, 11:08 AM
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.

Gary Schlosberg
21 Nov 2013, 2:03 PM
According to the bug tracker, it was fixed for 4.2.2. Are you seeing the issue in in 4.2.2?

JeromeA
21 Nov 2013, 2:19 PM
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.

JeromeA
22 Nov 2013, 7:57 AM
I recreated the issue with a simple project using ext 4.2.2. Here it is.

46964

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