{ "id": "61359", "key": "TIMOB-727", "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": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:03.000+0000", "created": "2011-04-15T02:35:14.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:03.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}
See:
\nAFAICT this works like it should for Android, marking as\nresolved
Tested on: android emu, 1.4.X (2 Nov), 1.5.X (6 Nov), ubuntu
\nIt is extremely difficult to pinpoint, but in some cases the\nwindow focus event still does not fire. Run this app.js for\nexample:
\n\n\nvar win1 = Titanium.UI.createWindow({\n title:'Window 1',\n backgroundColor:'#f00'\n});\n\nvar win2 = Titanium.UI.createWindow({\n url:'window_focus.js',\n title:'Window 2',\n backgroundColor:'#0f0'\n});\n\nwin1.addEventListener('click', function(){\n win2.open();\n});\n\nwin1.addEventListener('focus', function(){\n Ti.API.info(\"------ in window1 focus event ----\");\n});\n\nwin2.addEventListener('focus', function(){\n Ti.API.info(\"------ in window2 focus event ----\");\n});\n\nwin1.open();
\n
\nConfusingly, the focus event in \nwindow_events.js fires correctly.
btw, Marshall, I'm conscious about whether it's bad etiquette to\nreopen such an old, closed ticket. My reason for adding here was\nbecause the issue is not conclusive. If you want me to open a fresh\none, just let me know as I would be happy to do so.
I dont think the issue is resolved. If you open a window in\nANDROID, the FOCUS event fires. But if that win opens another\nwindow, then returns to the first window, the focus does not\nre-fire on ANDROID. It does re-fire on iPHONE. I wrote a demo app\nto demonstrate my point, but I dont know how to send it it. Its a\ncompressed file at the moment. This demo app does not run from\napp.js.
\nI posted the note here: \nhttp://developer.appcelerator.com/question/79371/focus-event-not-fi...
\nand I tried to put the demo code up here: https://gist.github.com/675571
my point, I dont belive that the focus event is resolved for\nANDROID.
Vincent
\nYour usecase code is far too complicated, containing too much\nsuperfluous functionality, to be useful here. Paste a new simple\nversion to your thread on the appcel website, and I will look at it\nfor you.