Opened 13 years ago
Last modified 13 years ago
#8813 confirmed Bug
Cell width is not updated when cells are merged
Reported by: | Teresa Monahan | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Tables | Version: | 3.1 |
Keywords: | IBM | Cc: | Damian, Satya Minnekanti |
Description
To Reproduce:
- Copy the following table into Source view. This is just a standard table with widths applied to all cells in the first row:
<table border="1" cellpadding="1" cellspacing="1" style="width: 400px;"> <tbody> <tr> <td style="width: 100px;"> </td> <td style="width: 100px;"> </td> <td style="width: 100px;"> </td> <td style="width: 100px;"> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table>
- Switch to wysiwyg mode and select any 2 cells in row 1. Right click and select Cell -> Merge Cells.
- Switch to source view to see the HTML markup for the table.
Problem: The cell that was merged still has a width of 100px. It should now have a width of 200px i.e. the sum of the widths of the merged cells.
<table border="1" cellpadding="1" cellspacing="1" style="width: 400px;"> <tbody> <tr> <td colspan="2" rowspan="1" style="width: 100px;"> </td> <td style="width: 100px;"> </td> <td style="width: 100px;"> </td> </tr> ...... </tbody> </table>
Cell widths should also be updated when merged using the Cell -> Merge Right option.
Change History (2)
comment:1 Changed 13 years ago by
Summary: | Cell width is not updated when cell are merged → Cell width is not updated when cells are merged |
---|
comment:2 Changed 13 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.6.3 (SVN - trunk) → 3.1 |
Reproducible from CKEditor 3.1
IMO the safest option would be changing the width only if two merged cells have this attribute present. In other cases when only one cell has width E.g set to 100px I would leave it the same after merging.
Sure that if you have E.g Table -> 400px and cells -> 100, no width, 50, 150 you can calculate the remaining size and add it to merged cell but what if you have Table -> 400px and cells -> 100px, none, 300px, 300px (it's possible)? In this case you would endup with -300px (400-700). Again sure that you can be smart and not add width if it is below 0 but what if for some reason user wanted to leave size of merged cell to 100px ?
Perhaps a better general overview of how merging widths should work is needed.