{ "id": "62538", "key": "TIMOB-1906", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:57:30.000+0000", "created": "2011-04-15T03:05:16.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:57:30.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

When an event is fired in a child and propagated up the tree,\nthe source is getting set to the proxy that's firing it and does\nnot preserve the initial source.

\n

See Helpdesk\n45061

\n
\nvar w = Ti.UI.createWindow({ backgroundColor : 'blue' , name : 'w'});\nw.addEventListener('focus', function(e) {\n    Ti.API.info(\"Window Focus: \" + e.type + \" \" + e.source + \" \" + e.source.name);\n});\n\nvar b = Ti.UI.createButton({ title : 'Click Me', width : 100, height : 50 , top : 20, name : 'b'});\nb.addEventListener('focus', function(e) {\n    Ti.API.info(\"Button Focus: \" + e.type + \" \" + e.source + \" \" + e.source.name);\n});\n\nvar b1 = Ti.UI.createButton({ title : 'Click Me', width : 100, height : 50, top : 90, name : 'b1' });\nb1.addEventListener('focus', function(e) {\n    Ti.API.info(\"Button 1 Focus: \" + e.type + \" \" + e.source + \" \" + e.source.name);\n});\n\nw.add(b);\nw.add(b1);\n\nw.open({ animated : false});\n
\n

{html}", "attachment": [], "flagged": false, "summary": "Android: Event Source Gets Reset", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126954", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [66b7aa975c491b00c7c58e0aa97a95b41d183e4f])\n[#1906 state:fixed-in-qa] the problem was that if\na null event object was passed, it wasn't being created at the\ninitial fireEvent location. Therefore each proxy was creating its\nown event object and setting itself as the source. Some view\nevent's like 'click' set the source explicitly so masked the\nunderlying problem. \nhttp://github.com/appcelerator/titanium_mobile/commit/66b7aa975c491...

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:05:17.000+0000", "updated": "2011-04-15T03:05:17.000+0000" }, { "id": "126955", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

thanks for the screenshot :)

\n

closed against 1.6 G1 and a sim running 2.2

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:05:17.000+0000", "updated": "2011-04-15T03:05:17.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }