Mobile Safari sometimes does not trigger the click event
The click event resulting from a tap on iOS will bubble as expected under just certain conditions -- one of which you mentioned, the cursor style. Here is another:
The target element, or any of its ancestors up to but not including the
<body>
, has an explicit event handler set for any of the mouse events. This event handler may be an empty function.
http://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
This is much better fix vector, and can be done without a browser check. You do have to add an extra div due to the "not including the <body>
" part:
<body>
<div onclick="void(0);">
<!-- ... all your normal body content ... -->
</div>
</body>
Now every click event originating inside that div will bubble as expected in iOS (meaning you can catch them with $(document).on('click', '.class', etc...)
).
Have you tried this?? This is because ios doesn't fire the click event sometimes, only recognizes the touch event
$(document).on('touchstart click', [Selector], [ Event ]