Closed
Bug 258564
Opened 21 years ago
Closed 21 years ago
Inconsistent Behaviour in DOM while trying to sort a table
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: daniel.oconnor, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
In the first example it works fine, in the second example inconsitent behaviour
is shown.
Selects wrong column to highlight.
Reproducible: Always
Steps to Reproduce:
1. Click a header
2. Try to click another header
Actual Results:
See tablesort2.html : Incorrect column highlighted and sorted, then will no
longer work.
Expected Results:
See tablesort.html : correctly sort table
Reporter | ||
Updated•21 years ago
|
Component: DOM: Traversal-Range → DOM
![]() |
||
Comment 1•21 years ago
|
||
Is returnColumnClicked returning the wrong column number?
What exactly is the difference between the two testcases? Both have a lot of
extraneous stuff not relevant to this bug, which makes debugging very difficult...
Reporter | ||
Comment 2•21 years ago
|
||
(In reply to comment #1)
> Is returnColumnClicked returning the wrong column number?
> What exactly is the difference between the two testcases? Both have a lot of
> extraneous stuff not relevant to this bug, which makes debugging very
difficult...
Yeah... sorry about that; its rather... verbose.
There is *no* difference between either except for the contents of the
<table></table>
So something, somewhere, has decided it doesn't like it.
![]() |
||
Comment 3•21 years ago
|
||
The key difference here is between:
<tr>
<td>ID</td><td>Description</td><td>Qty</td><td>Unit</td>
</tr>
and
<tr><td>First Name</td><td>Middle Name</td><td>Last Name</td><td>Age</td></tr>
Note the whitespace differences. In the first case, the firstChild of the table
row is a #text node; in the second case it's a <td> Element node. In IE, it's
the Element node in both cases; IE magically loses the #text nodes somehow.
Removing that whitespace makes things work.
The script needs to be fixed not to make incorrect assumptions about the DOM...
see bug
*** This bug has been marked as a duplicate of 26179 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•