{ "id": "154100", "key": "TIMOB-20191", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-01-11T14:15:20.000+0000", "created": "2016-01-04T13:55:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.3.0" ], "versions": [], "issuelinks": [ { "id": "50218", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "80257", "key": "TIMOB-5553", "fields": { "summary": "MobileWeb: event.source of tableView always return tableViewRow object", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-04-26T22:05:57.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "The e.source of a table click event is supposed to return the table row but instead it returns the table view", "attachment": [], "flagged": false, "summary": "The e.source of a table click event is supposed to return the table row but instead it returns the table view", "creator": { "name": "kenjorai", "key": "kenjorai", "displayName": "Kai Lu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kenjorai", "key": "kenjorai", "displayName": "Kai Lu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Windows Phone", "closedSprints": [ { "id": 555, "state": "closed", "name": "2016 Sprint 1 SDK", "startDate": "2016-01-02T01:31:50.127Z", "endDate": "2016-01-16T01:31:00.000Z", "completeDate": "2016-01-18T00:52:43.848Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "373772", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Confirmed that TableView click event actually returns table row as source on iOS.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nvar tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ];\r\nvar table = Ti.UI.createTableView({\r\n data: tableData\r\n});\r\ntable.addEventListener('click', function(e) {\r\n Ti.API.info(e.source == table);\r\n Ti.API.info(e.source.toString());\r\n});\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n\r\nBut is this really how it's supposed to work? I thought it should return true \"event source\" in theory.\r\n\r\n{code}\r\nobject.addEventListener('xxx', function(e) {\r\n THIS_SHOULD_BE_TRUE(e.source == object);\r\n});\r\n{code}", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-05T02:23:14.000+0000", "updated": "2016-01-05T02:23:14.000+0000" }, { "id": "373773", "author": { "name": "kenjorai", "key": "kenjorai", "displayName": "Kai Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Kota,\r\n\r\nI 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.\r\n\r\nSo, 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.\r\n\r\nRegards,\r\n\r\nKai", "updateAuthor": { "name": "kenjorai", "key": "kenjorai", "displayName": "Kai Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-05T02:32:26.000+0000", "updated": "2016-01-05T02:32:26.000+0000" }, { "id": "374137", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/529", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-11T01:19:00.000+0000", "updated": "2016-01-11T01:19:00.000+0000" }, { "id": "383988", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Tested demo code provided in PR and all return true: \r\n{code:java}\r\nvar win = Ti.UI.createWindow();\r\nvar tableData = [{ title: 'Apples' }, { title: 'Bananas' }, { title: 'Carrots' }, { title: 'Potatoes' }];\r\nvar table = Ti.UI.createTableView({\r\n data: tableData\r\n});\r\ntable.addEventListener('click', function (e) {\r\n Ti.API.info(e.source != table); // should be true\r\n Ti.API.info(e.source == e.row); // should be true\r\n Ti.API.info(e.source.title == e.row.title); // should be true\r\n});\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n\r\nTested on: \r\nWindows 10 Pro \r\nWindows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.6.0.201604081249 \r\nTi SDK: 5.3.0.v20160421080259 \r\nAppc NPM: 4.2.5-3\r\nAppc Core: 5.3.0-34 \r\nNode: v4.4.2\r\n\r\n*Closing Ticket.*\r\n\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-04-26T22:05:50.000+0000", "updated": "2016-04-26T22:05:50.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }