Closed Bug 188234 Opened 21 years ago Closed 21 years ago
When HREF anchor tags are nested on a page, clicking goes to URL of outer tag, not inner
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.2.1) Gecko/20021130 In the page at http://www.piffaro.com/ contains nested anchor tags. Here is an excerpt. <a href="pages/about.html"> <table > <tr> <td > <a href="pages/calendar-local.html">CONCERT SERIES</a> </td> <td > <a href="pages/calendar-tour.html">TOUR CALENDAR</a> </td> <td> HOME </td> </tr> </table> </a> Clearly this was built by a loosing editor. But the current default behavior of selecting the outer URL ("about.html") rather than the inner ("calendar-tour.html") when clicking on TOUR CALENDAR does not give access to that page. Furthermore, both IE and iCab goto the URL of the inner tag, leaving people who don't test thoroughly to believe their page works properly. Reproducible: Always Steps to Reproduce: 1. Goto page with nesting anchor tags (e.g. http://www.piffaro.com/) 2. Hover cursor over inner anchor tag, URL of outer tag will display 3. Click on inner tag, page will goto outer tag's URL. Actual Results: Displayed URL of outer tag and went to that page. Expected Results: Displayed URL of inner tag and went to that page. This is a reading of a non-standard part of the HTML standard, so it is almost could be classified an RFE rather than a Bug, but it does prevent easy access to certain malformed web content.
I don't think it is reasonable, to open nested links. In w3 specification, we could read (http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2.2): Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements. So only way to resolve such situation exept current, is manualy finish <a> link if next <a> is occured. So code like <a> text <table> <a></a> <table></a> may be parsed as <a> text </a><table><a></a></table>. BTW, it is dupe of bug 26583.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Summary: When href anchor tags are nested on a page, clicking goes to URL of outer tag not inner → When HREF anchor tags are nested on a page, clicking goes to URL of outer tag, not inner
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.