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)
Core
DOM: UI Events & Focus Handling
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.
Reporter | ||
Updated•25 years ago
|
QA Contact: petersen → py8ieh=bugzilla
![]() |
||
Comment 1•25 years ago
|
||
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>
![]() |
||
Comment 2•25 years ago
|
||
Reporter | ||
Comment 5•25 years ago
|
||
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
Reporter | ||
Comment 6•25 years ago
|
||
![]() |
||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Reporter | ||
Updated•25 years ago
|
Summary: Generated content on <A> is not clickable → Generated content on <A> is not clickable [GC]
![]() |
||
Updated•24 years ago
|
Whiteboard: [nsbeta3-] → [nsbeta3-] relnote-devel
Reporter | ||
Comment 8•24 years ago
|
||
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)
Reporter | ||
Comment 9•24 years ago
|
||
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
Reporter | ||
Updated•24 years ago
|
Whiteboard: relnote-devel → [Hixie-P4] relnote-devel
![]() |
||
Comment 10•23 years ago
|
||
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.
Reporter | ||
Updated•23 years ago
|
Whiteboard: [Hixie-P4] relnote-devel → [Hixie-P3] relnote-devel
Assignee | ||
Updated•23 years ago
|
Component: Layout → Event Handling
Comment 11•23 years ago
|
||
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.
Assignee | ||
Comment 12•23 years ago
|
||
Assigning pierre's remaining Style System-related bugs to myself.
Assignee: pierre → dbaron
Status: ASSIGNED → NEW
Comment 13•23 years ago
|
||
Reconfirmed using FizzillaCFM/2002071208. Setting All/All.
OS: Windows 2000 → All
Hardware: PC → All
Comment 14•22 years ago
|
||
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)
Comment 15•21 years ago
|
||
wfm: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031028
Assignee | ||
Comment 16•21 years ago
|
||
*** Bug 231166 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 17•21 years ago
|
||
This actually works for me, although if there were any remaining problem it
would probably be fixed by bug 214013.
Updated•21 years ago
|
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•