[TIMOB-23973] iOS: Events on images inside ListViewItem templates not fired (regression)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-10-04T04:21:34.000+0000 |
Affected Version/s | Release 5.4.0, Release 5.5.0 |
Fix Version/s | Release 6.0.0 |
Components | iOS |
Labels | imageview, kroll-thread, listview, load, qe-6.0.0, regression |
Reporter | Nuno Costa |
Assignee | Hans Knöchel |
Created | 2016-09-28T21:36:04.000+0000 |
Updated | 2016-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
File | Date | Size |
---|---|---|
2313275.jpg | 2016-09-28T21:37:31.000+0000 | 42590 |
index.js | 2016-09-28T21:34:34.000+0000 | 258 |
index.tss | 2016-09-28T21:48:21.000+0000 | 479 |
index.xml | 2016-09-28T21:34:23.000+0000 | 457 |
TIMOB-23973_used_images.zip | 2016-10-03T16:09:18.000+0000 | 86993 |
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!
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.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!
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!*Glad you solved it! Took me hours, days to isolate this issue :) I will test then I will report back Hans Knoechel.
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
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.
Usually for small changes I do the above. Many Thanks!
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*.
CR and FT passed. PRs merged. Good job.
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.*