Closed
Bug 7292
Opened 26 years ago
Closed 25 years ago
JS handler should get called when label is clicked (radio/checkbox)
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Core
DOM: UI Events & Focus Handling
Tracking
()
People
(Reporter: Brade, Assigned: joki)
Details
(Whiteboard: [TESTCASE][FIX])
Attachments
(1 file)
When the user clicks on a label which is associated with a radio button or a checkbox, the onclick handler should get fired.
Reporter | ||
Updated•26 years ago
|
Component: Widget Set → Event Handling
QA Contact: phillip → desale
Reporter | ||
Comment 1•26 years ago
|
||
reset QA Contact per beppe
Updated•26 years ago
|
Whiteboard: [MAKINGTEST] -- run2000@geocities.com
Updated•26 years ago
|
Whiteboard: [MAKINGTEST] -- run2000@geocities.com → [TESTCASE]
Comment 2•26 years ago
|
||
Updated•25 years ago
|
OS: Mac System 8.5 → All
Hardware: Macintosh → All
Whiteboard: [TESTCASE] → [TESTCASE][FIX]
Comment 3•25 years ago
|
||
Tom, here's a fix for ya'. I wonder if you could look it over, to see if it's
kosher? If so, I can just check it in, since it's already in my tree. :)
Index: nsHTMLLabelElement.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp,v
retrieving revision 1.15
diff -r1.15 nsHTMLLabelElement.cpp
31a32,33
> #include "nsIDocument.h"
> #include "nsIDOMHTMLDocument.h"
296c298
< return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
---
> nsresult rv = mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
297a300,328
> if (NS_SUCCEEDED(rv)) {
> nsAutoString elementId;
> rv = GetHtmlFor(elementId);
> if (NS_SUCCEEDED(rv)) {
> nsIDocument* doc = nsnull;
> rv = mInner.GetDocument(doc); // Strong
> if (NS_SUCCEEDED(rv)) {
> nsIDOMHTMLDocument* htmldoc = nsnull; // Strong
> rv = doc->QueryInterface(nsIDOMHTMLDocument::GetIID(),(void**)&htmldoc);
> if (NS_SUCCEEDED(rv)) {
> nsIDOMElement* element = nsnull; // Strong
> rv = htmldoc->GetElementById(elementId, &element);
> if (NS_SUCCEEDED(rv)) {
> nsIContent* content = nsnull; // Strong
> rv =
element->QueryInterface(nsIContent::GetIID(),(void**)&content);
> if (NS_SUCCEEDED(rv)) {
> content->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
> aFlags, aEventStatus);
> NS_RELEASE(content);
> }
> NS_RELEASE(element);
> }
> NS_RELEASE(htmldoc);
> }
> NS_RELEASE(doc);
> }
> }
> }
> return rv;
299d329
<
Comment 4•25 years ago
|
||
If I ever finish moving all of the form element event handling code from the
frames to the content as Rod suggested, this would make the label frame pretty
thin! :)
Comment 5•25 years ago
|
||
*** This bug has been marked as a duplicate of 7554 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 6•25 years ago
|
||
Brade do you want to verify this one ?
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
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
•