events on :before and :after not going to parent

VERIFIED FIXED in M11

Status

()

defect
P3
normal
VERIFIED FIXED
20 years ago
a month ago

People

(Reporter: dbaron, Assigned: troy)

Tracking

Trunk
All
Other
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fix attached, URL)

Attachments

(1 attachment)

Since :before and :after should, I think, work just as events do on child
elements.  That is, events sent to the :before in

<a><:before>pseudo-text</:before>more-text</a>

should work just as those sent to em in:

<a><em>em-text</em>more-text</a>

In the former case, links to not work.  Clicking or hovering over pseudo-text
shows no link behavior (see above URL).  However, the latter case works.  I
think they should both work like the latter case since :before and :after
create a new first-child and last-child in a formatting sense.
So what is the situation with this bug?

David's example is great in that it points out inconsistet behaviour. Also, XML
can have empty elements (no content even allowed). If such an element happend to
be a link element, for example, the link would be unusable if this bug was not
fixed. Simply because of this limitation on XML I even considered setting the
severity to major...

Wouldn't it be simple to fix this? Just pass on the events from the generated
content to its effective parent element?

Updated

20 years ago
Blocks: 9184
Whiteboard: fix attached
I hate doing this, but... There is a really small patch attached that fixes this
problem, so what is taking so long? Perhaps more importantly, why is there not a
target milestone, I think M11 would be resonable? I'll set it to M11 now, yell
at me if I should not be touching target milestone fields...
(Assignee)

Updated

20 years ago
Assignee: joki → troy
(Assignee)

Comment 4

20 years ago
*** Bug 5349 has been marked as a duplicate of this bug. ***
Bug 5349 is the same problem applied to alt text of broken images in links;
since alt text is internally treated as generated content this is the same
problem.
(Assignee)

Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

20 years ago
Changed CreateGeneratedFrameFor() to set the parent object and the document
object of the generated content
Blocks: 1994

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 7

20 years ago
verified
Blocks: 75185
No longer blocks: 1994
Component: Event Handling → User events and focus handling
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.