Closed Bug 537948 Opened 15 years ago Closed 15 years ago

[HTML5] The procedure to fix a <a> around a <tr> element is acting weird.

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows XP
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: vjeuxx, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2b5) Gecko/20091204 Firefox/3.6b5 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2b5) Gecko/20091204 Firefox/3.6b5 (.NET CLR 3.5.30729) -> It moves the <a> before the <table> (good) but closes it (bad) -> If there is a <a> around the <table>, it is being closed (bad) -> If there is a <div> between the outer <a> and <table>, the outer <a> is being copied and therefore appear twice, and is being closed. (bad) -> If there is a <span> between the outer <a> and <table>, the outer <a> is not being closed (good) Reproducible: Always Steps to Reproduce: Load the page Actual Results: <a class="outer" href=""></a> <a class="inner"></a> <table> <tr> <td>Table</td> </tr> </table> Expected Results: <a class="outer" href=""> <a class="inner"> <table> <tr> <td>Table</td> </tr> </table> </a> </a> See the HTML comments for a detailed bug report
Henri can probably say what the current HTML5 draft says about this case. (and HTML5 parser seems to create something strange, many inner a elements or something like that. HTML5 parser isn't enabled by default.)
Comparing to the other browsers, it seems that the inner being closed is the norm but the outer being closed is indeed a bug. None of them have problem with adding <span> and <div> inside the outer <a> Chrome Beta 4.0.266.0 <a href="" class="outer"> <a class="inner"></a> <table>...</table> </a> Opera 10.00 Build 1750 <a href="" class="outer"> <table> <a class="inner"></a> <tbody>...</tbody> </table> </a>
With the HTML5 parser, the result is less reasonable than in WebKit. Not sure yet if it's an implementation bug or a spec bug. Morphing this into an HTML5 parser bug, since other weirdness in the old parser is also being left unfixed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Summary: The procedure to fix a <a> around a <tr> element is acting weird. → [HTML5] The procedure to fix a <a> around a <tr> element is acting weird.
Is this causing compatibility problems with a real-world Web site?
The behavior here is as specced. Not an implementation bug.
IE8 (both IE8 standards mode and quirks mode) acts mostly like the outer <a> were closed. (The DOM IE8 creates is not a tree, though.) Is this causing a problem on a real site that works in IE8?
Since evidence of a real-world site breakage hasn't been presented, I'm resolving this INVALID per spec.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.