maksimenko
2 Aug 2010, 1:01 PM
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...
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
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...
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