Closed Bug 344387 Opened 18 years ago Closed 18 years ago

item labels of select don't focus select on click

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

Details

(Keywords: fixed1.8.0.8, fixed1.8.1.1)

Attachments

(2 files)

psyched_weels wrote in bug 332081:

when I press the labels for
the checkboxes inside an select element nothing happens.
I would expect that while pressing/clicking a label the checkbox (or radio in
case of select1) would be set to selected=true.
This is however not defined in the w3c recomendation. It's just a nice feature
of the old label elements in html.
Attached file testcase
Summary: item labes of select don't focus select on click → item labels of select don't focus select on click
I guess that we need html:label elements for that. (Or at least their way of working). Labels are now implemented as html:span elements. We need something like an @for="id_of_input_element". But we don't necessarily have the name or id of the element. We could generate an id, right?

Or am I wrong in my conclusions?

(In reply to comment #2)
> I guess that we need html:label elements for that. (Or at least their way of
> working). Labels are now implemented as html:span elements. We need something
> like an @for="id_of_input_element". But we don't necessarily have the name or
> id of the element. We could generate an id, right?
> 
> Or am I wrong in my conclusions?
> 

Note, I guess we have the same problem for xul too :)

It's good to reuse code but I don't prefer generating id. The first I don't see way how it can be done technically. The second we can broke document where xforms are hosted.
Attached patch patchSplinter Review
Assignee: xforms → surkov.alexander
Status: NEW → ASSIGNED
Attachment #237313 - Flags: review?(Olli.Pettay)
Comment on attachment 237313 [details] [diff] [review]
patch


>+xul|*:root select[appearance="full"] xul|*.checkbox-label-box,
>+xul|*:root select1[appearance="full"] xul|*.radio-label-box {
>+  display: none;
>+}
>+

Why this?
That part explained, r=me
Attachment #237313 - Flags: review?(Olli.Pettay) → review+
Comment on attachment 237313 [details] [diff] [review]
patch

(In reply to comment #5)
> (From update of attachment 237313 [details] [diff] [review] [edit])
> 
> >+xul|*:root select[appearance="full"] xul|*.checkbox-label-box,
> >+xul|*:root select1[appearance="full"] xul|*.radio-label-box {
> >+  display: none;
> >+}
> >+
> 
> Why this?
> That part explained, r=me
> 

That hides containers where are placed xul:label and xul:image for checkbox and radiobox. Even if is empty the it is still has border when element is focused. I can't use the containers to show the xforms label since it doesn't allow explicit children.
Attachment #237313 - Flags: review?(doronr)
Attachment #237313 - Flags: review?(doronr) → review+
well, I'll check it in, but surkov, please open a new bug for the wrong behaviors that your testcase exhibits with this fix:

1) clicking on the label of a select1 radio button should NOT toggle the selection.  If you click on the label of a radio button, this radio button should become the current selection.  But clicking on the same label again should have no affect (since it is already the current selection).  It should not deselect the radio button

2) If you reload the testcase so that nothing is selected and then click both checkboxes, then the bound value should be "l b".  So no radio button should be selected, but there is one that is selected.

Thanks.
checked into trunk for surkov
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
I filed bug 353598 for aaron's issues.
checked into 1.8.0 branch on 2006/09/21
Keywords: fixed1.8.0.8
checked into 1.8 branch on 2006/11/21
Keywords: fixed1.8.1.1
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: