Question

When I add a label to a field in any form within my AngularJS app, it results in a behavior where clicking a field assigns focus to the field above, thus making it impossible to select a field.

The quick fix it to not use labels and just a different tag to replace labels, but it seems like an odd bug not being able to use labels for fields. Anyone else experience this lately?

Here is an Angular fiddle for solving this Angular riddle:

http://bit.ly/154zU1H

Was it helpful?

Solution

You messed up your close tags on the labels:

http://jsfiddle.net/ysQPt/

    <label>Label 1<label>

    <label>Label 1</label>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top