Skip to content
This repository has been archived by the owner on Oct 12, 2019. It is now read-only.

"for" attribute in label-tags breaks check_boxes / radio behavior #95

Open
dlsym opened this issue Feb 6, 2014 · 0 comments
Open

"for" attribute in label-tags breaks check_boxes / radio behavior #95

dlsym opened this issue Feb 6, 2014 · 0 comments

Comments

@dlsym
Copy link

dlsym commented Feb 6, 2014

Scenario:
Multiple instances of a form rendered on a single page.

Bug:
Clicking a label will trigger a checkbox in the wrong form.
(I have this problem in Chrome 32.0.1700.102, Linux and QtWebkit)

My solution for now is removing the "for" attribute in labels via javascript. But this is IMHO kinda ugly... :-/

In my opinion the "for"-attribute is not really needed since the input element is wrapped in the label-tag. Clicking on a parent label will propagate the click to the child input element and everything works fine.

Since the "for"-attribute is not required and the behaviour for labels with their corresponding input element wrapped inside is well defined (1) I think the best solution would be to just ommit the attribute in this case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant