I have added some simple javascript to a site:
jQuery(document).click(function(){
alert('click');
});
...and it only fires in iOS when someone clicks on an actual anchor element, button element, or on something with cursor: pointer;
CSS.
Specifically, I am seeing this with the Bootstrap 3 fixed navbar menu. When it's open, I have added:
jQuery(document).click(function(){
jQuery('#navbar-collapse.collapse.in').collapse('hide');
});
to ensure that it closes no matter where someone clicks.
This is not working in iOS (verified on iPhone 4, iPhone 6/6+ and iPads).
It seems that jQuery click events only register on "clickable" elements (A, BUTTON, etc) or elements with cursor: pointer;
CSS or onClick='...something...'
or even or onClick=''
HTML attributes.
So, my question. Is this just me? Does anyone else see this?