Closed Bug 170215 Opened 22 years ago Closed 22 years ago

With onclick on DIV, the textnode is the event-target

Categories

(Core :: DOM: Events, defect)

All
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 42717

People

(Reporter: zanstra, Assigned: joki)

References

()

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530 With an onclick on a DIV-element, the event-target is the TextNode. The DIV will be in bubbling phase. A textnode shouldn't be an event-target, since it is not an element. With on onclick on a BUTTON-element, the event-target is the BUTTON element. This is correct behaviour. Reproducible: Always Steps to Reproduce: See page on supplied URL. 1. Click on the div 2. Click on the button Actual Results: 1. '#text' is alerted 2. 'BUTTON' is alerted Expected Results: 1. 'DIV' should have been alerted 2. not wrong I think this is a bug. I'm not to sure, because DOM Level 2 Events is a bit unclear about html-binding.
bug 42717, bug 152202 comment 7. *** This bug has been marked as a duplicate of 42717 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
verifying
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.