Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14510] iOS: touchstart or touchend event on a ListView template makes the app crash

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-24T16:57:21.000+0000
Affected Version/sRelease 3.1.1, Release 3.2.0
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsiOS
Labelscrash, iOS, module_listview, qe-closed-3.2.0, qe-testadded, triage
ReporterPatrick Daigle
AssigneeVishal Duggal
Created2013-07-10T18:05:49.000+0000
Updated2014-02-20T06:43:53.000+0000

Description

Comments

  1. Daniel Sefton 2013-07-10

    Tested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA and latest 3.2 CI.
  2. Mark Mokryn 2013-10-21

  3. Mark Mokryn 2013-10-21

    Here's a bandaid fix that works. In the method handleControlEvents in TiUIView.m modify the if statement to this:
       if ([parentProxy viewAttached] && [parentProxy canHaveControllerParent] && [parentProxy respondsToSelector:@selector(handleControlEvents)]) 
       
    This prevents the crash, but there is something very weird about the touchstart and touchend handling, and in any case I think all the ListView event handling needs a lookover: e.g., you can't listen for touchstart and touchend on ListViews, but you can for other touch events... why??? Makes no sense, for example, to listen for a longpress when you can't get the touchend, etc.
  4. Mark Mokryn 2013-10-22

    To clarify: the fix above is absolutely valid, and restores the intended functionality. Pending a refactor of touch handling in TiUIView.m - this small fix does the job for now. I highly suggest pulling it into the code, for now at least.
  5. Vishal Duggal 2013-10-23

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4841
  6. Mark Mokryn 2013-10-24

    Great! Any chance of backporting this small fix to 3.1.x as well?
  7. Pragya Rastogi 2013-10-25

    Tested & Verified the fix with: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201310250414 SDK: 3.2.0.v20131024120843 acs:1.0.7 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: ipad 7.0 Device: iPod touch 2 (v iOS7)

JSON Source