Closed Bug 25306 Opened 25 years ago Closed 25 years ago

first cell inserted into an empty table row appears last in the row despite insertCell index parameter

Categories

(Core :: Layout: Tables, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED DUPLICATE of bug 9271

People

(Reporter: myk, Assigned: karnaze)

References

()

Details

Overview Description: Table cells inserted into a table row via the insertCell method should appear in the order prescribed by the cell indexes specified as a parameter of the insertCell method. When inserting a series of cells at index 0 (zero) each cell correctly gets inserted before its siblings, but when inserting cells at an index greater than the last existing index, the first inserted cell always appears last, even though it should appear first. The other cells appear in the correct order. Steps to Reproduce: 1) Insert a new row into an existing table via Javascript. 2) Insert a series of cells with content that indicates the order of the cells and an index value greater than the greatest existing cell index. Actual Results: The first cell inserted into the new row appears last in the row. Expected Results: The first cell inserted into the new row appears first in the row. Build Date & Platform Bug Found: Linux 2000012520 (M13) Additional Builds and Platforms Tested On: none Additional Information: none
I recently encountered a problem similar to this one using the JavaScript array.sort() function. The objects in my array (dates in this case) were being sorted such that the object at array index zero (0) was sorted to the end of the array, even though it was the earliest date in the array. It turned out I made a mistake in failing to return the results of my sort calculation from the custom sort function I was using. The following line produced the errant sort order: ary.sort( function (a,b) { a - b; } ); Replacing it with this line returned the correct sort order: ary.sort( function (a,b) { return a - b; } ); It doesn't seem likely this is the problem here since I don't think you are using JavaScript to store these nodes (nor do you have any reason to sort them), but I mention it anyway just in case there's a connection
*** This bug has been marked as a duplicate of 9271 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Keywords: verifyme
verifying this bug is duplicate
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.