#5677 closed bug (patchwelcome)
Live click events don't register on MobileSafari (iPhone)
Reported by: | maxogden | Owned by: | maxogden |
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | event | Version: | 1.4a1 |
Keywords: | iphone, mobilesafari, live | Cc: | |
Blocked by: | Blocking: |
Description
See gist: http://gist.github.com/259656
This was tested on a 2G iPhone running software v3.1.2.
I was able to reproduce the bug in 1.4a1 and 1.3.2.
Change History (13)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Milestone: | 1.4 → 1.5 |
---|---|
Owner: | changed from brandon to maxogden |
Priority: | minor → low |
Status: | new → pending |
That work around is not a valid replacement for a live handler. It's very different, and somewhat obtrusive.
Is this still an issue with 1.4.4pre?
comment:3 Changed 13 years ago by
Status: | pending → new |
---|
seems to still be a problem with the current git version. I upgraded the test case to use http://code.jquery.com/jquery-git.js, and it still works on desktop browsers, but fails to register 'live click' on mobilesafari: http://bl.ocks.org/259656
comment:4 Changed 13 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
Technically, click events don't exist on touch devices. You may have more luck by adding in support for touch events. However, it's half support for firing both a touch and a click event seems like this could eventually work. I'd say that filing this to the jquery mobile team would be the quickest way to get this fixed since jQuery doesn't officially support safari mobile, but jquery mobile does.
comment:7 follow-up: 8 Changed 12 years ago by
Quick fix:
Just add "cursor: pointer" to the element's CSS and the live click event will work as expected.
comment:8 follow-up: 11 Changed 12 years ago by
Replying to Matt:
Quick fix:
Just add "cursor: pointer" to the element's CSS and the live click event will work as expected.
I can vouch for this. What an odd workaround for a frustrating problem.
comment:9 Changed 12 years ago by
So does this mean that this has been fixed in the next release of jQuery or was it just closed as in "will never be fixed" connotation?
comment:10 Changed 12 years ago by
@andrewmoorewatson, it means that this is not something jQuery can fix transparently. The click event does not occur at the document level if the element is not natively clickable, so we cannot process it. You'll need to use one of the solutions outlined here or elsewhere and accept their drawbacks.
comment:11 follow-up: 12 Changed 11 years ago by
comment:12 Changed 11 years ago by
Replying to anonymous:
I tried it ,it's awsome.who knows why?Replying to anonymous:
Replying to Matt:
Quick fix:
Just add "cursor: pointer" to the element's CSS and the live click event will work as expected.
I can vouch for this. What an odd workaround for a frustrating problem.
Yup worked for me too :)
The workaround is to add onclick="" to the element you are attaching the event to per http://www.greaterscope.com/blog/2010/09/15/jquerys-live-click-handler-on-mobile-safari/