Closed
Bug 31588
Opened 25 years ago
Closed 25 years ago
Clicking on text in named anchor jumps to top of anchor when anchor is not terminated
Categories
(Core :: DOM: HTML Parser, defect, P3)
Tracking
()
People
(Reporter: jruderman, Assigned: cmanske)
References
()
Details
Attachments
(1 file)
619 bytes,
text/html
|
Details |
Steps to reproduce:
1. Go to http://www.freei.net/ffaq.htm
2. Scroll down to the first paragraph below the table of contents
3. Click on some text in the middle of the paragraph
Result:
Browser jumps up to near the top of the page.
Possibly related to Bug 29416.
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Comment 2•25 years ago
|
||
http://www.freei.net/ffaq.htm has an unclosed <a name="top"> tag near the top,
and that's what's causing the problem. The paragraphs after the first three
are excluded because they're below a table (I have no idea why this excludes
them, though).
Reporter | ||
Comment 3•25 years ago
|
||
Changing summary from "Clicking in paragraph below named anchor jumps to top"
to "Clicking on text in named anchor jumps to top of anchor".
Summary: Clicking in paragraph below named anchor jumps to top → Clicking on text in named anchor jumps to top of anchor
Reporter | ||
Comment 4•25 years ago
|
||
The editor, interestingly, does include the text under the table as part of the
link (which it shows as underlined). The table only stops named anchors (not
hrefs) and only in the mozilla browser.
Reporter | ||
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
Confirming, nice test case. Changing component to parser. Is this right?
Status: UNCONFIRMED → NEW
Component: Browser-General → Parser
Ever confirmed: true
Assignee | ||
Comment 7•25 years ago
|
||
Anchor should be terminated with </a> to prevent this.
Not sure why there's a difference with browser behavior.
Assignee: cbegle → cmanske
Summary: Clicking on text in named anchor jumps to top of anchor → Clicking on text in named anchor jumps to top of anchor when anchor is not terminated
Reporter | ||
Comment 8•25 years ago
|
||
I don't think it's limited to non-terminated <a> tags. Try adding a </a> at
the bottom of the test case -- I think the same things happen.
Assignee | ||
Comment 9•25 years ago
|
||
Yes, but my point is that the correct HTML syntax for named anchor should
always have </a> immediatley following the <a>. The test case is definitely
incorrect. This bug is essentially invalid, but I plan to send it off to
layout for the issue that there's a difference in parsing between browser
and editor. The parser should automatically "insert" the </a> when it is
missing as a "bad HTML fixup".
Assignee | ||
Comment 10•25 years ago
|
||
The fact that it underline text between <a> and </a> (bug 31594) means it is
treating this as a link. Thus this behavior is expected.
*** This bug has been marked as a duplicate of 31594 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•