Closed Bug 25046 Opened 26 years ago Closed 26 years ago

html:label doesn't work

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: alecf, Assigned: waterson)

Details

(Whiteboard: [PDT+])

Attachments

(1 file)

at least in XUL, if I have a html:label for an html:input element, the label doesn't activate the input. e.g. <html:input type="checkbox" id="baby"><html:label for="baby">Click me baby!</html:label>
Reassigning to Rod.
Assignee: karnaze → rods
Chris, the checkin I mentioned doesn't effect this part of it. I am reassigning this to you. Basically, as we discussed a XULDocument should probably implement nsIDOMHTMLDocument.
Assignee: rods → waterson
meant to add ben goodger to the CC here, he's looking for this too
The problem is that the <html:label> code is expecting to be able to query the document to an nsIDOMHTLMDocument. The way I see it we have three choices. 1. Support nsIDOMHTMLDocument in nsXULDocument. This would add a fair number of unimplemented methods to the XUL document. 2. Hack <html:label> to QI() for nsIDOMXULDocument if the QI() to nsIDOMHTMLElement fails. This would embed knowledge about XUL into HTML. 3. Add GetElemenyById() to nsIDocument. This would make <html:label> elements work in plain old XML, also. I favor doing either (1) or (3). Maybe (3) more than (1), now. vidur, hyatt: what say you?
Status: NEW → ASSIGNED
Target Milestone: M14
Blocks: 24872
I like (3). I know I did (2) in at least one place, though, unless somebody removed it. I remember it having to do with labels. I do not like the idea of having XUL doc implement nsIDOMHTMLDocument, unless of course this is what's going to happen for XML documents with HTML markup anyway (I don't know of a decision in this regard yet). I would think that the root tag's namespace would have something to do with which DOM document interface was chosen (e.g., XUL vs. HTML vs. some other ML), and so it doesn't seem like a XUL document should be implementing the HTML document interface. I vote for (3).
No longer blocks: 24872
Setting severity to critical
Severity: normal → critical
Adding beta1 keyword
Keywords: beta1
this magically started working today! thanks, whoever did it :)
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → WORKSFORME
Alec, is this working in your local tree? 'Cuz I'm still seeing it on the following platforms with today's commercial build: - Linux6 2000-02-01-10 Commercial build - Win98 2000-02-01-08 Commercial build - MacOS86 2000-02-01-09 Commercial build
works for me on linux and windows with today's build.
Either a) my testcase is crackers; b) this got broken again; or c) something else got broken. In the testcase below (also added as an attachment), I have two variations of the label/checkbox thing. In the first, the 'Click me baby' text shows up, but clicking the text does not (de)select the checkbox. In the second, the 'Click me again baby' text does not show up (and is not clickable). Alec, do I have an 'bad' testcase, is the build broken, or is it something else? Reopening bug. <?xml version="1.0"?> <window xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <html:form method="post" action=""> <html:input type="checkbox" id="baby"/> <html:label for="baby"> Click me baby! </html:label> <html:input type="checkbox" id="againbaby"> <html:label for="againbaby"> Click me again baby! </html:label> </html:input> </html:form> </window>
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Attached file Testcase
Putting on PDT+ radar for beta1.
Whiteboard: [PDT+]
So I just downloaded this test case. The first label seem to be working fine. Are you sure that your webserver is serving up "text/xul" as the MIME type for XUL files? (I noticed that, in the bug, you didn't add the test case as "text/xul".) The second label isn't showing up, but my guess is that the XUL content sink doesn't do the "fixup" that the HTML sink does: you've put the <label> *inside* the <input>. Marking fixed.
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
I'm 99% sure my server is set up to serve xul...I have other .xul files in the http://voodoolady/bugzilla/ directory that appear to load fine. Chris, could you show me this (or any other like-kind) testcase working on your system? I'll update the testcase and upload it as a text/xul file...
Okay. I'm a complete buckethead. I set the extension as xml instead of xul. Duh-uh! Marking VERIFIED FIXED on: - Linux6 2000-02-21-08 Commercial build - MacOS9 2000-02-21-08 Commercial build - Win98 2000-02-21-08 Commercial build
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: