120
rated 0 times
[
127]
[
7]
/ answers: 1 / hits: 22363
/ 13 Years ago, fri, september 9, 2011, 12:00:00
Tapping on <label>
does not auto-focus linked in Mobile Safari but If an empty function as clickhandler is defined
like this
document.getElementById(test_label).onclick = function () {};
solves the problem.
This is the full source code.
<body>
<input type=checkbox id=test name=test>
<label for=test id=test_label>This is the label</label>
<script>
document.getElementById(test_label).onclick = function () {};
</script>
</body>
Do you know why it works?
More From » ios