[TIMOB-20204] iOS: ListView - onload events of template items not fired
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-27T08:03:26.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | listview, mainthread, qe-5.4.0 |
Reporter | Feon Sua Xin Miao |
Assignee | Hans Knöchel |
Created | 2016-01-06T23:11:35.000+0000 |
Updated | 2016-10-01T23:11:30.000+0000 |
Description
For iOS, onload
event attached to any listview template items is not fired. It does fire for Android.
Step to reproduce
1. Run attach app on iOS Simulator
2. Run attach app on on Android Emulator
3. Compare both results
Expected Result
On 3rd row, images are animating for both OS
Actual Result
On 3rd row, images are animating on Android, but not on iOS.
Attachments
[~fmiao] Since expected result is:
On 3rd row, images are animating for both OS
I see them animated in 3rd row andload
event is invoked on all three rows as well.Can you please reverify and update this ticket.
[~ssombhatla], I still get the same result, the 3rd row is blank, attached a screenshot of what I see after the simulator is loaded.
This is
TI_USE_KROLL_THREAD
issue. A quick work around is to setunder
ios
in tiapp.xml. I need to investigate for the fix.When
TI_USE_KROLL_THREAD
is enabled, the image is loaded before the events are added. Soload
event is not fired. This fix will listen to added events and then fire the load event. PR: https://github.com/appcelerator/titanium_mobile/pull/7879 Use the attached app.js. Test by changing values onunder
ios
in tiapp.xmlVerified as fixed, the event is fired and the image is animated with
run-on-main-thread
set to true/false. Tested on: iPhone 5s (9.2) iOS Simulator (9.3) Android emulator (6.0) Mac OSX El Capitan 10.11.5 Studio: 4.7.0.201607070843 Ti SDK: 5.4.0.v20160705213725 Appc NPM: 4.2.8-1 Appc CLI: 5.4.0-26 Xcode 7.3.1 Node v4.4.4 * Closing Ticket*Reopening. This fix produces a regression for all images in both standalone imageviews and embedded imageviews in lists/tables. The exact issue is [here](https://github.com/appcelerator/titanium_mobile/commit/a2ce6d1dfac7d75d73ad66656ffbe11200061db3#diff-bda46bd3120801c618c5afee61c97391R67), so we need to check what's going wrong there exactly Demo to reproduce:
Expected behavior: The images change on click Actual behaior: The images do not change on click Thanks to [~michael] for reporting! *EDIT*: Diving deeper into that issue, I noticed that he overwrote a proxy delegate method which has bad impact on the whole proxy handling. So we may -revert this PR for 5.4.0 so the regression to the user-cases is fixed and try to- fix this issue differently.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/8158 PR (5_4_X): https://github.com/appcelerator/titanium_mobile/pull/8159 This needs be tested against both the original demo-code (list-view with images) as well as the regression demo in the comment above. For QE: Please also test this with the KitchenSink app and the "Employee Directory" app from Studio. [~bgrantges@appcelerator.com] reported a possible regression issue (TIMOB-23669) recently that is surely related to this one.
@hansknoechel 5_4_x patched worked fine with the provided demo. All images update on click with and without main-thread.
CR and FT passed. Approved!
Verified as fixed. Tested both the original demo-code as well as the second test case above. Also verified TIMOB-23669 and closed. Tested On: iPhone 6S (9.3.3) Device Mac OSX El Capitan 10.11.6 Ti SDK: 5.4.0.v20160802165655 Appc Studio: 4.7.0.201607111053 Appc NPM: 4.2.7 App CLI: 5.4.0-37 Xcode 7.3 Node v4.4.7 *Closing ticket.*