Bug Tracker

Ticket #10546 (closed bug: cantfix)

Opened 3 years ago

Last modified 2 years ago

.live not working on iOS 5

Reported by: jquerybugs@… Owned by:
Priority: high Milestone: None
Component: event Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

Here is a fiddle demonstrating the issue:

 http://jsfiddle.net/hjYRR/2/

Please refer to this URL on iOS to test the bug:

 http://jsfiddle.net/hjYRR/2/embedded/result/

Change History

comment:1 Changed 3 years ago by addyosmani

  • Priority changed from undecided to high
  • Status changed from new to open
  • Component changed from unfiled to event

Confirmed on iOS5. .bind() test working fine but .live() is unresponsive.

comment:2 Changed 3 years ago by sindresorhus

comment:3 Changed 3 years ago by dmethvin

  • Keywords needsdocs added
  • Status changed from open to closed
  • Resolution set to cantfix

Unfortunately, we cannot fix this in core. There is a workaround but it has several negative side-effects that would drive people crazy.

We'll be writing up some workarounds and putting them at the new documentation site; they essentially come down to:

  • Use clickable elements such as a or button that do bubble, which is best practice anyway.
  • Use .on() or .delegate() to handle the click event *below* the level of document.body, since iOS does bubble it there.
  • Apply the cursor: pointer CSS style to the element that needs to bubble clicks or a parent (including document.documentElement if necessary). Realize that this will cause all touched elements to be highlighted and also disable copy/paste, so it's not a good solution.

comment:4 Changed 3 years ago by addyosmani

Working through docs for this atm.

comment:5 Changed 3 years ago by addyosmani

  • Keywords needsdocs removed

Docs updated.

comment:6 Changed 3 years ago by gravof

Since .live() is deprecated, I guess the docs should be move to .on()?

Last edited 3 years ago by gravof (previous) (diff)

comment:7 Changed 2 years ago by sindresorhus

#11831 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.