Add this snippet to the script.js file of your theme to fix the fact that you can not click the form item through the label in iOS devices.

/* IPHONE CLICK */

if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)) {
	$('label[for]').click(function () {
		var el = $(this).attr('for');
		if ($('#' + el + '[type=radio], #' + el + '[type=checkbox]').attr('selected', !$('#' + el).attr('selected'))) {
			return;
		} else {
			$('#' + el)[0].focus();
		}
	});
}

You will have to add the Drupal specific bits you need for the JQuery to work on load for either D6 or D7.

Comments

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bmx269’s picture

No one else thought this was useful?

drclaw’s picture

Totally useful. Just used your snippet and it worked like a charm!

bmx269’s picture

Thanks for the feedback. I don't have a lot to contribute code wise, so I appreciate the fact that it was useful.

casey’s picture

Even easier is adding onclick="" to the <labels> elements. Or even simpler, to the <body> element.