Collapse row content 2 or more times by javascript cause resetting of "colspan" and multipling row height

RESOLVED INVALID

Status

()

RESOLVED INVALID
14 years ago
14 years ago

People

(Reporter: davalv, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.2) Gecko/20040803
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.2) Gecko/20040803

Collapse row content 2 or more times by javascript cause resetting of "colspan"
and multiply row height.

Reproducible: Always
Steps to Reproduce:
Click 2 or more times on the plus/minus character to collapse the row content.
This is the source of the example page:



<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
  var ie4 = false;
  if (document.all) { ie4 = true; }

  function getObject(id) {
    if (ie4) { return document.all[id]; }
	else { return document.getElementById(id); }
  }

  function toggle(link, divId) {
    var lText = link.innerHTML;
	var d = getObject(divId);
    if (lText == '+') {
	  link.innerHTML = '&#8722;';
	  d.style.display = 'block';
	}
    else {
	  link.innerHTML = '+';
	  d.style.display = 'none';
	}
  }
</script>
</head>
<body> 
<br> 
<table border="3" align="center"> 
  <tr class="TestoNormaleGiallo"> 
    <td >[<a id="exp1091815944_link" onclick="toggle(this, 'exp1091815944');"
style="cursor:pointer">-</a>] Name Surname Test </td> 
    <td align="right">Total due: 000,00 &euro;</td> 
  </tr> 
  <tr id="exp1091815944"> 
    <td colspan="2"><table align="center" border="1" cellpadding="3"
cellspacing="0" class="TestoNormaleNero"> 
        <tr> 
          <th>Person</th> 
          <th>Sum</th> 
          <th>Date</th> 
          <th>Extinguished</th> 
          <th>Note</th> 
        </tr> 
        <tr bgcolor="#FFCC00"> 
          <td>Name PPP</td> 
          <td>111.00</td> 
          <td>01/01/2004</td> 
          <td>Yes</td> 
          <td>Test 1</td> 
        </tr> 
      </table></td> 
  </tr> 
</table> 
</body>
</html>
Actual Results:  
"Colspan" property seems to be lost after 1 or more collapse.
Row height multiply its value after 2 or more collapse.
>	  d.style.display = 'block';

The default display value of table rows is "table-row".  Setting them to "block"
will change the layout, correctly (that's what loses the colspan).  You want to
set the display to the empty string to have it work right in IE (which doesn't
properly support "table-row").

The space-increasing thing is a problem in Mozilla, but is already filed.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.