PDA

View Full Version : [CLOSED] [4.2b] Checkbox should ignore inputWidth



Daniil
24 Dec 2012, 4:22 AM
REQUIRED INFORMATION

Ext version tested:

Ext 4.2 beta

Browser versions tested against:

Chrome
IE9

DOCTYPE tested against:

<!DOCTYPE html>

Description:

Probably, a Checkbox should ignore the inputWidth setting. I set up the inputWidth setting via FormPanel's fieldDefaults and a Checkbox is not rendered well. Please look at the screenshot.
Generally, I understand what happens and a workaround is easy - setting "inputWidth: 13" for a Checkbox. Just report to you. Maybe, you would like to fix it.

Steps to reproduce the problem:

Just run the sample

The result that was expected:

A common checkbox

The result that occurs instead:

There is a group of four different checkboxes.

Test Case:

<!DOCTYPE html>
<html>
<head>
<title>Checkbox inputWidth</title>

<link rel="stylesheet" href="../resources/css/ext-all.css" />

<script src="../ext-all-debug.js"></script>

<script>
Ext.onReady(function () {
Ext.create("Ext.form.Panel", {
renderTo: Ext.getBody(),
fieldDefaults: {
inputWidth: 90
},
items: [{
xtype: "checkbox"
}, {
xtype: "textfield"
}]
});
});
</script>
</head>
<body>
</body>
</html>


HELPFUL INFORMATION

Screenshot:

40951

mitchellsimoens
26 Dec 2012, 8:19 AM
Thanks for the report! I have opened a bug in our bug tracker.

I do think that the developer should also make sure not to use it also. LIke this using your code


Ext.create("Ext.form.Panel", {
renderTo : Ext.getBody(),
fieldDefaults : {
inputWidth : 90
},
items : [
{
xtype : "checkbox",
inputWidth : false
},
{
xtype : "textfield"
}
]
});