Closed Bug 10702 Opened 25 years ago Closed 24 years ago

Events do not work on the HTML tag (Related to bug 3140?)

Categories

(Core :: DOM: Events, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: jonesev, Assigned: vidur)

References

Details

(Keywords: testcase, Whiteboard: [TESTCASE] HTML should recieve events)

Attachments

(1 file)

If you create an HTML page with an event on the HTML page, the javascript is never triggered. Here is an example (see attachment): <html onclick="alert(event.target.nodeName)"> <head> <title>Click Me!</title> </head> <body> <p>You should be able to click on this web page and get an alert that says HTML. </body> </html> When you click somewhere on the page or the text, if I understand the DOM sufficiently, the click should pass to the P object, then to the BODY, then to HTML. It does not. However, if you put the event on the BODY tag, event.target.nodeName is HTML. I think this is related to bug 3140, but I am reporting it because I am not sure. Can someone confirm if this is the same problem?
Depends on: 3140
Whiteboard: [TESTCASE] HTML should recieve events
HTML 4.0 does not allow event attributes on the HTML element. So the part of this dealing with the HTML element may be a parser issue that should be fixed only for quirks mode.
Assignee: vidur → rickg
Component: DOM Level 0 → Parser
"Dump content" in viewer shows the onclick attribute is not in the content model (but it is when it's on the body element, where it is allowed). I'm changing component to HTMLParser and reassigning, but I think this should be resolved invalid because the attribute is invalid. I hope that's not a bad thing to do, but vidur has lots of bugs right now...
Assignee: rickg → vidur
Component: Parser → DOM Level 1
V -- I think this should be yours to look at. The parser doesn't prevent ANY attributes from coming through.
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
Turns out that we don't deal with *any* attributes on the HTML element. See bug 17913.
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
I'm moving to M18 along with the other HTML element attribute bug.
Target Milestone: M18
Not sure when this was fixed but it seems to work now. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Component: DOM Level 1 → DOM Events
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
verified...but how did i end up as contact person for this bug
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: