Closed Bug 46891 Opened 25 years ago Closed 21 years ago

Generated content on <A> is not clickable [GC] (attr(href) links)

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: ian, Assigned: dbaron)

References

Details

(Keywords: css2, relnote, testcase, Whiteboard: [Hixie-P3] relnote-devel)

Attachments

(2 files)

Generated content on <a> elements, like: a:before { content: 'Hello World'; } <a href="test.html"></a> ...is styled (correctly) as a link, and responds like a link when clicked, but does not do the most important thing for a link to do, namely, open the target page. This is probably related to the bubbling of events hitting generated content, for which there exists several bugs. TO REPRODUCE: http://www.bath.ac.uk/~py8ieh/internet/projects/mozilla/linktests.html Click on any of the Top/Next/Prev links on that page. In particular, click on the last three of the nine, since they are generated content on the <A> element. EXPECTED RESULTS: You should be taken to http://www.mozilla.org/. ACTUAL RESULTS: Nothing interesting happens other than the link changing colour while you are clicking it. NOTES: If you click on the whitespace to the right of the link text, you will be taken to the right page. This is because the whitespace is also part of the <a> element, but is not part of the generated content. The status bar does not think you are over the link when you are over the generated content. REPRODUCED ON: Win32 M17 branch commercial build 2000072812.
QA Contact: petersen → py8ieh=bugzilla
Ian, could you investigate a bit further? Your page shows the problem but the code snippet below works correctly: <style> a:before { content: 'Hello World: '; } </style> <body> <h2>test</h2> <a href="http://www.yahoo.com/">I am here!</a> </body>
huh. Ok, will investigate.
Assignee: clayton → py8ieh=bugzilla
I tracked it down...and this is weird. a:before { content: 'test' } /* works */ a:before { content: attr(href) } /* fails */ For some reason, we are not creating the same type of frame for text content as for attr() content?? I will attach a simplified test case that shows this.
Assignee: py8ieh=bugzilla → pierre
[nsbeta3-].
Keywords: relnote
Whiteboard: [nsbeta3-]
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Summary: Generated content on <A> is not clickable → Generated content on <A> is not clickable [GC]
Whiteboard: [nsbeta3-] → [nsbeta3-] relnote-devel
Turns out you can't drag those links into another window either. Same bug?
Summary: Generated content on <A> is not clickable [GC] → Generated content on <A> is not clickable [GC] (attr(href) links)
Pierre: Could you have a quick look at this to work out if it is an easy fix? If it is, I would really love to have this particular bug fixed, since it is making my test plan page (from which I do a great deal of my testing) much more difficult to use (yes, I have a weird stylesheet on there, so sue me). If it is not a simple bug, then I'll manage, but if it is, it would be nice to have it fixed. Thanks! :-)
Whiteboard: [nsbeta3-] relnote-devel → relnote-devel
Whiteboard: relnote-devel → [Hixie-P4] relnote-devel
Blocks: 104166
This concerns not only <A> but also any xlink element. I ran into mission impossible when I have xlinks that are empty (!) and would like to use one of the attributes as text to click on.
Whiteboard: [Hixie-P4] relnote-devel → [Hixie-P3] relnote-devel
Component: Layout → Event Handling
I have this in my user stylesheet: *[accesskey]:after { content: " {" attr(accesskey) "}" } *[tabindex]:after { content: " [" attr(tabindex) "]" } I can click on the brackets and braces when they're in links, but not on the attr parts of the links.
Assigning pierre's remaining Style System-related bugs to myself.
Assignee: pierre → dbaron
Status: ASSIGNED → NEW
Reconfirmed using FizzillaCFM/2002071208. Setting All/All.
OS: Windows 2000 → All
Hardware: PC → All
has this magically fixed itself in the last year? clicking on "This won't work." in the 2nd testcase sends me to www.mozilla.org with 2003082403 OS X does someone have an xlink testcase floating around? (comment 10)
wfm: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031028
*** Bug 231166 has been marked as a duplicate of this bug. ***
This actually works for me, although if there were any remaining problem it would probably be fixed by bug 214013.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: