Tapping on <label> in Mobile Safari Tapping on <label> in Mobile Safari ios ios

Tapping on <label> in Mobile Safari

People using FastClick:

Use this CSS:

label > * {    display: block;    pointer-events: none;}

see this issue: https://github.com/ftlabs/fastclick/issues/60

and this codepen: http://codepen.io/visnup/pen/XJNvEq

We were able to work around this issue at Etsy by simply adding this single line of code to our global javascript file.

$('label').click(function() {});

We are using the xui micro js library and that line simply attaches an empty click handler to all label elements. For some reason, this magically fixes the issue on mobile safari.

It looks like you found a bug in iOS Safari. Congratulations! Finding and reporting bugs is addictive.

You can report this and other bugs to Apple at https://bugreport.apple.com/. Apple might not follow up immediately, but at some point in the future they should notify you that it was a duplicate of an existing bug, that they don’t consider it a bug, or (if you’re lucky) that you should test it again in a new version of iOS.

In the mean time, hold onto this workaround — you’ll need it.