Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23973] iOS: Events on images inside ListViewItem templates not fired (regression)

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-10-04T04:21:34.000+0000
Affected Version/sRelease 5.4.0, Release 5.5.0
Fix Version/sRelease 6.0.0
ComponentsiOS
Labelsimageview, kroll-thread, listview, load, qe-6.0.0, regression
ReporterNuno Costa
AssigneeHans Knöchel
Created2016-09-28T21:36:04.000+0000
Updated2016-10-05T17:00:49.000+0000

Description

I think I found an issue on images inside ListViewItem templates, the event did not fire if we have *"+image+" property*. Works just fine on 5.2.X and 5.3.X, but not on 5.4.GA and 5.5.GA. Actually is very irregular. *Not fire the event: (with "+image=""+" property)*
<ItemTemplate id="template" name="template">
  <ImageView bindId="imageGrid" id="imageGrid" image="2313275.jpg" onClick="Test" />
  </ItemTemplate>
*Fired normally! ({color:red}without{color} "+image=""+" property)*
 <ImageView bindId="imageGrid" id="imageGrid" onClick="Test" />
Also seams if I put "run-on-main-thread TRUE", the event fires normally too, but I can't do that in our project.
<property name="run-on-main-thread" type="bool">true</property>
In our project is comment out, like:
 <!--<property name="run-on-main-thread" type="bool">true</property>-->
P.S. In our case we have 3 events, which they worked acceptably well on the 5.2.x and 5.3.x sdk. We have this issues since the 5.4.GA, but just yesterday is that I've isolated the problem in detail.
 <ImageView bindId="imageGrid" id="imageGrid" onDoubletap="flip" onLongpress="doShowBtns" onSingletap="doTap" />

There is any workaround until the fix? We need to release the app :)

Attachments

FileDateSize
2313275.jpg2016-09-28T21:37:31.000+000042590
index.js2016-09-28T21:34:34.000+0000258
index.tss2016-09-28T21:48:21.000+0000479
index.xml2016-09-28T21:34:23.000+0000457
TIMOB-23973_used_images.zip2016-10-03T16:09:18.000+000086993

Comments

  1. Nuno Costa 2016-09-28

  2. Nuno Costa 2016-10-03

    Let me know if you want me test/change something in this/my side in order to speedup the process? Any "Objc-C" code anything is fine!
  3. Hans Knöchel 2016-10-03

    The issue was initially caused by [this commit](https://github.com/appcelerator/titanium_mobile/pull/7879) and was fixed for one of the use-cases with [this commit](https://github.com/appcelerator/titanium_mobile/pull/8158). So either we revert the load-event ticket completely or find a way to process this special event on the kroll-thread correctly.
  4. Hans Knöchel 2016-10-03

    Hui, just fixed it the first issue (load-event). Basically we need to revert all those proxy-changes that have been made by the previous two PR's and add the correct delegate to the view. Yay!
  5. Hans Knöchel 2016-10-03

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/8461 PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8462 Test-cases (run with and without main-thread, use the attached images): https://gist.github.com/hansemannn/0f654bcaee125e7df994625bedc6d840 -But I noticed that this will only work for the load-event, when the load event does not need to be triggered asynchronously (which is a likely use-case). So I still need to find out how to delegate the string through the proxy and fire it as soon as it's available.- -- *Fixed!*
  6. Nuno Costa 2016-10-03

    Glad you solved it! Took me hours, days to isolate this issue :) I will test then I will report back Hans Knoechel.
  7. Nuno Costa 2016-10-03

    Hans Knoechel, Im running here 5.5.1.GA, I duplicated the sdk folder to 5.5.1.dev (usual I do this), now what is PR that I should use: PR (master): https://github.com/appcelerator/titanium_mobile/pull/8461 PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8462
  8. Hans Knöchel 2016-10-03

    To patch it manually, fork the 5_5_X branch and cherry-pack from either of both (they should both integrate well into 5_5_X). But don't simply replace the files, that could lead to bad side-effects. Cherry-picking is the way to go here.
  9. Nuno Costa 2016-10-03

    Usually for small changes I do the above. Many Thanks!
  10. Nuno Costa 2016-10-03

    My quick tests, says to me this works like is supposed to! #Kudos for #Hans Knoechel and to #all Should be Fixed and works ok on 5.5.1.dev :) *P.S:* Tested +against our app+ with +use case above reported+ , *is fixed*.
  11. Chee Kiat Ng 2016-10-04

    CR and FT passed. PRs merged. Good job.
  12. Josh Longton 2016-10-05

    Verified as fixed, events are now being fired. Tested On: {noformat} iPhone 6 10.0 Device iPhone 7 10.0 Sim iPhone 5 9.3.5 Device Mac OSX El Capitan 10.12 Ti SDK: 6.0.0.v20161005072811 Appc Studio: 4.8.0.201609292239 Appc NPM: 4.2.8-7 App CLI: 6.0.0-56 Xcode 8.0 Node v4.4.7 {noformat} *Closing ticket.*

JSON Source