Closed
Bug 24057
Opened 25 years ago
Closed 25 years ago
Cell (row?) index not accurate after inserting new row in table
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
FIXED
M13
People
(Reporter: cmanske, Assigned: karnaze)
Details
1. Open a new page in Composer 2. Create a table by clicking on Table toolbar icon. Change the number of rows to 2 to create a 2x2 table. (This is important, default of 1 row, 2 cols doesn't show the bug!) is OK. Caret should be in first cell after table is inserted. 3. Use menu: Table | Insert | Row below A new row with 2 cells is inserted, but the caret should be in the first new cell in the second row. This seems to be a failure in getting the cell indexes (row=1, col=0) that were stored to relocate the caret after row insertion. Putting a breakpoints in mozilla/editor/base/EditTable.cpp demonstrates the error: Break at res = GetCellDataAt(table, startRowIndex, startColIndex, res = GetCellDataAt(table, startRowIndex, startColIndex, *getter_AddRefs(curCell), ... (around line 250 in method InsertTableRow()) to get the address of the cell at 0,0 before the new row is inserted. Break at: res = CreateElementWithDefaults("td", getter_AddRefs(newCell)); to get addresses of new cells to be inserted. Break at: res = GetCellAt(aTable, aRow, aCol, *getter_AddRefs(cell)) in the method SetCaretAfterTableEdit() to get address of cell where the caret should be moved to. aRow should be 1, aCol = 0. You will see that the cell returned is same as the starting cell, thus the caret is moved as it should be. Tracing into GetCellAt reveals error in identifying the new cell because of an incorrect rowindex in the cell frame class. It is curious that the caret is moved correctly to a new cell in a newly-inserted row if the starting table has 1 row and 2 columns.
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•25 years ago
|
Target Milestone: M13
Assignee | ||
Comment 1•25 years ago
|
||
Fixed with latest checkin.
You need to log in
before you can comment on or make changes to this bug.
Description
•