Opened 11 years ago

Closed 10 years ago

#12898 closed defect (wontfix)

DataGrid: Column widths to small with Chrome

Reported by: manklu Owned by: Evan
Priority: high Milestone: 1.8
Component: DojoX Grid Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


Chrome (all WebKit? based browsers?) has two problems with grids:

  1. With 'table-layout:fixed; width: 0;', the table cells are in border box mode, and as result is the content area of the cell to small.

The fix for this is to remove the width from the table.

  1. After the fix for the first problem, the table cell cannot be smaller than the content.

To fix this, an extra div is needed for the clipping.

As an example, compare the layout of e.g. dojox/grid/tests/enhanced/test_enhanced_grid_pagination.html with other browsers.

Attachments (1)

patch.txt (1.8 KB) - added by manklu 11 years ago.
The patch contains all needed changes I know. Tested with Chrome 11.0.696.60

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by manklu

Attachment: patch.txt added

The patch contains all needed changes I know. Tested with Chrome 11.0.696.60

comment:1 Changed 11 years ago by evan

Hi manklu,

I don't quite understand this issue, can you post a test case or snapshot?


comment:2 Changed 11 years ago by manklu

Open the test dojox/grid/tests/enhanced/test_enhanced_grid_pagination.html with Chrome and compare the layout with FF or IE8. You will notice that all columns are smaller with Chrome.

comment:3 Changed 11 years ago by Andrew Muraco

I came across this issue and fixed it in a similar way. I also noticed that Chrome(webkit) does different width computation between th and td's, It will add border width to the css width of a th, where as a td will total the css width including the border.

I ended up putting a div in each column and putting the border on the div.


comment:4 Changed 11 years ago by Evan

Owner: changed from evan to Evan

comment:5 Changed 11 years ago by bill


Moving apparently forgotten ticket to 1.8.

comment:6 Changed 10 years ago by Evan

Resolution: wontfix
Status: newclosed

Seems column width is actually larger in chrome vs ff in the latest version, and the font size etc.are also different even with the same test case. Making them look exactly the same would require significant efforts.

Thanks for manklu's patch, but adding an extra div in cell might not be an ideal solution due to the extra dom burden on rendering and also risky to break some of the existing Grid features on cell dom accessing.

Note: See TracTickets for help on using tickets.