Thank you for reporting this bug. We will make it our priority to review this report.
-
Ext JS Premium Member
[3.3.x] [FIXED-1173] grid column width problem on webkit browsers
Hello there,
Since the grid refactoring, all the columns in a grid (with forceFit: true, inside a layout: border, region: center) are rendered with the same width on webkit browsers (tested on chrome 5.0.375.125 & chromium 6.0.483.0 - 54509)
The problem is a missing + "px" on the Ext.isNumber & if (Ext.isBorderBox || (Ext.isWebKit && !Ext.isSafari2)) case...
Code:
Ext.override(Ext.grid.GridView, {
getColumnWidth: function (column) {
var columnWidth = this.cm.getColumnWidth(column),
borderWidth = this.borderWidth;
if (Ext.isNumber(columnWidth)) {
if (Ext.isBorderBox || (Ext.isWebKit && !Ext.isSafari2)) {
return columnWidth + "px";
} else {
return Math.max(columnWidth - borderWidth, 0) + "px";
}
} else {
return columnWidth;
}
}
});
With that it renders as expected on webkit browsers (tested also on ie non-strict, quirks mode)
Let me know if you need more info.
Thanks
-
[type]: fix
[module]: GridView
[id]: #1173
[desc]: Fixes #1173. getColumn witdth should always append 'px' to numeric values before returning.