[TIMOB-14510] iOS: touchstart or touchend event on a ListView template makes the app crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-10-24T16:57:21.000+0000 |
Affected Version/s | Release 3.1.1, Release 3.2.0 |
Fix Version/s | 2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0 |
Components | iOS |
Labels | crash, iOS, module_listview, qe-closed-3.2.0, qe-testadded, triage |
Reporter | Patrick Daigle |
Assignee | Vishal Duggal |
Created | 2013-07-10T18:05:49.000+0000 |
Updated | 2014-02-20T06:43:53.000+0000 |
Tested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA and latest 3.2 CI.
Here's a bandaid fix that works. In the method handleControlEvents in TiUIView.m modify the if statement to this:
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.
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.
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4841
Great! Any chance of backporting this small fix to 3.1.x as well?
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)