I'm building grid component for my own needs with sortable columns, rows, etc. Existing ones either were not suiting my needs or were too heavy. I just started on resizable columns when realy unexpectedly WebKit has hit my with unexplainable anomaly. While table-layout:fixed; worked perfectly on all other browsers (even IE) Safari/Chrome gave me a headache.
Here is what I wrote so far: TSort Embriyo
As you can see it creates two tables - one for headers and one for body and some wrappers around them. Then it tries to make use of table-layout:fixed, since it better fits dynamical grid concept. For table-layout:fixed it is crucial for table to have a width, in addition to that all my cells (td/th) have overflow:hidden, white-space:nowrap and text-overflow:ellipsis to mimic grid appearance better.
Now the "bug" - both tables are constructed the same way, width of the cells and of the table is calculated and set by the same function. The "bug" is unexplainable because approach I use works as expected for top table but fails for bottom one. Basically it acts as if I had no width assigned to it. But you can see in Web Inspector that it definitely has the width... So... huh?
I tried everything, I swapped functions, I removed top table, I tried to built bottom table the way I build top table. But it keeps failing. However when I copy/paste generated table code into the page directly it starts to work. So my guess here is that it has something with dynamical nature of the table. But why it works on the top table then?
I was able to kinda get rid of this "bug" by creating table element with pre-assigned width. But it doesn't explain the weird behavior, does it?