{ "id": "61523", "key": "TIMOB-891", "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:54:35.000+0000", "created": "2011-04-15T02:38:38.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:35.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}

Implement window focus/blur

{html}", "attachment": [ { "id": "17889", "filename": "screen-shot-2011-03-19-at-214.png", "author": { "name": "elimor", "key": "elimor", "displayName": "Eli Mor", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:39.000+0000", "size": 123748, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: window focus, blur events missing", "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": "124276", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "{html}

This is crucial to how my apps work when users change tabs.\nSince a few of the tabs use the same code in different contexts -\neg: twitter timelines for friends, mentions, favorites etc. I\nsuppose I could code around it for now and use copies of various\nscripts.

\n

Any idea when this might get addressed?

\n

It's a bit of a showstopper.

{html}", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2011-04-15T02:38:39.000+0000", "updated": "2011-04-15T02:38:39.000+0000" }, { "id": "124277", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

@kosso can you paste a boiled down use case for you app? we'd\nlike to get this fixed

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:39.000+0000", "updated": "2011-04-15T02:38:39.000+0000" }, { "id": "124278", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "{html}

Hi,

\n

Try this: http://pastie.org/1035404

\n

It contains the JS required for app.js and test.js - for a\nsimple test

\n

The use case for this is for (example) a Twitter client, where\neach tab is used for the list of tweets.
\nThey all the use same functions based in app.js but with differnt\ncontexts and 'request_type' (eg: friends, mentions, favorites,\netc.) - The API requests and all the tableView building all uses\nfunctions in app.js too.

\n

It seems that Ti on Android does not support the Window focus\nevent which I use to see if the user has changed tab (and if it\nneeds to request more data etc) and also it seems that it also does\nnot support the ability for me to attach the name of the function\nin app.js as a window property when I build it - which works fine\nin iOS.

\n

Hope this helps! ;)

\n

K

{html}", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2011-04-15T02:38:40.000+0000", "updated": "2011-04-15T02:38:40.000+0000" }, { "id": "124279", "author": { "name": "jonclarke", "key": "jonclarke", "displayName": "Jon Clarke", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi

\n

The window focus and blur events are crucial for us!

\n

We use the window blur event to cancel pending asynchronous HTTP\nrequests that we don't wish to continue when the user selects\nanother tab bar option, for example.

\n

Thanks
\nJon

{html}", "updateAuthor": { "name": "jonclarke", "key": "jonclarke", "displayName": "Jon Clarke", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:40.000+0000", "updated": "2011-04-15T02:38:40.000+0000" }, { "id": "124280", "author": { "name": "jicksteen", "key": "jicksteen", "displayName": "Jick Steen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi,

\n

I just noticed that it does not work in 1.3.2, too. We want to\nuse the 'blur' to open a specific window cause we do not want to\ndisplay the previous opened window when the user presses the back\nbutton.

\n

Hope this will be fixed/implemented soon.

\n

Thanks

{html}", "updateAuthor": { "name": "jicksteen", "key": "jicksteen", "displayName": "Jick Steen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:40.000+0000", "updated": "2011-04-15T02:38:40.000+0000" }, { "id": "124281", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [17c619b957a9ace9c405b4e2ebc61dddbcd15b22])\n[#891\nstate:resolved] Fake fired after context loaded, fire during\nonStart if the proxy is available for focus. Fire in onStop if\nthere is a proxy for blur. \nhttp://github.com/appcelerator/titanium_mobile/commit/17c619b957a9a...

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:41.000+0000", "updated": "2011-04-15T02:38:41.000+0000" }, { "id": "124282", "author": { "name": "elimor", "key": "elimor", "displayName": "Eli Mor", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This issue is still broken in 1.6.1
\nTried the same code as copied from http://pastie.org/1035404.
\nThis is the output when switching between the windows.

\n

[INFO] Deployed testing ... Application\nshould be running. [INFO] [18,725] this is test.js :\nrequest_type:test_one [INFO] [17,47175] this is test.js :\nrequest_type:test_two

\n

Testing on android emulator

{html}", "updateAuthor": { "name": "elimor", "key": "elimor", "displayName": "Eli Mor", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:41.000+0000", "updated": "2011-04-15T02:38:41.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }