[TIMOB-20191] The e.source of a table click event is supposed to return the table row but instead it returns the table view
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-01-11T14:15:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.3.0 |
Components | Windows |
Labels | qe-5.3.0 |
Reporter | Kai Lu |
Assignee | Kota Iguchi |
Created | 2016-01-04T13:55:04.000+0000 |
Updated | 2016-04-26T22:05:57.000+0000 |
Description
The e.source of a table click event is supposed to return the table row but instead it returns the table view
Confirmed that TableView click event actually returns table row as source on iOS.
But is this really how it's supposed to work? I thought it should return true "event source" in theory.
Hi Kota, I think the source of a click event should be the top touchable source in the view hierarchy where the user has clicked on. The source can be the touchEnabled subview of the object that you have the listener on. So, if you clicked on the table, the row or a label on the row is the top view and hence the source of the click event. That's exactly what user wants to listen to. If I want to have the table as the source of the click event then I should make all its subviews as touchEnabled = false. Regards, Kai
https://github.com/appcelerator/titanium_mobile_windows/pull/529
Verified as fixed, Tested demo code provided in PR and all return true:
Tested on: Windows 10 Pro Windows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) Appc Studio: 4.6.0.201604081249 Ti SDK: 5.3.0.v20160421080259 Appc NPM: 4.2.5-3 Appc Core: 5.3.0-34 Node: v4.4.2 *Closing Ticket.*