Closed
Bug 415153
Opened 17 years ago
Closed 17 years ago
<a/> tag causes hover style to be applied to paragraph while <a></a> does not
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
DUPLICATE
of bug 162653
People
(Reporter: tlane, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
According to the XML spec, <tag/> and <tag></tag> are supposed to be equivalent representations of a tag with empty content. However, as the attached test case demonstrates, a named anchor represented as <a name="foo"/> will cause the anchor hover style to be applied to the paragraph that contains it, while the supposedly equivalent <a name="foo"></a> does not.
Reproducible: Always
Steps to Reproduce:
1. Load the attached test case, which has a red color hover style for anchors
2. Hover over the link, the first paragraph, and then the second
Actual Results:
The link and the second paragraph (the one with <a name="two"/>) turn red when you hover.
Expected Results:
Only the link should turn red.
That is, <a name="foo"></a> produces the correct behavior, and <a name="foo"/> should be equivalent to it.
Interestingly, Opera produces the same behavior. (IE does not.) Are you using some common code, perhaps?
Comment 2•17 years ago
|
||
Self-closing XML tags don't work in text/html. Use an XML mime type if you want XML parsing.
If you use something other than :hover to test, I think you'll find that IE's text/html parser has the same behavior.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•