Open Bug 289028 Opened 20 years ago Updated 2 years ago

rowSpan can't be set beyond current # of table rows

Categories

(Core :: Layout, defect)

x86
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: todd, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

If you're trying to create a table in the DOM and you want to set the rowSpan
beyond the current length of the table then it's truncated.  For example, I want
a table like this:

<table>
    <tr>
        <td rowspan=2>appears</td>
        <td>like</td>
    </tr>
    <tr>
        <td>this</td>
    </tr>
</table>

The corresponding javascript should look like this:

var table=document.createElement('table');
var row=table.insertRow(0);
var cell=row.insertCell(0);
cell.rowSpan=2;
cell.appendChild(document.createTextNode('appears'));
cell=row.insertCell(1);
cell.appendChild(document.createTextNode('like'));
row=table.insertRow(1);
cell=row.insertCell(0);
cell.appendChild(document.createTextNode('this...'));
document.getElementsByTagName('body')[0].appendChild(table);

The problem is that it doesn't work.  If I move the "cell.rowSpan=2;" line to
the very end then it works just fine.  It's like it limits rowSpaan to the max
number of rows currently in the table.  The above code works fine in IE.

Reproducible: Always

Steps to Reproduce:
1. Load the code snippet in the comments
2. See badness

Actual Results:  
See details

Expected Results:  
See details
I have found the same problem on Windows XP.

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
Gecko/20050317 Firefox/1.0.2

Setting the rowSpan greater than the number of rows in the table causes firefox
to crash.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Ok, I totally understand why we need autoresolve and I support the effort to 
clean up bugzilla, but in this case the process is just broken.  I logged a 
bug, there's a confirmation of the problem below, but QA hasn't looked at it 
yet.  Since we've provided a code snippet it should be brain-dead simple to 
test.  This bug should remain open and get either get fixed or tagged as 
WONTFIX.  It shouldn't just die because of lack of attention.  
Assignee: bross2 → nobody
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.