{ "id": "103888", "key": "TIMOB-11573", "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": "15272", "description": "2013 Sprint 04 API", "name": "2013 Sprint 04 API", "archived": true, "released": true, "releaseDate": "2013-02-25" }, { "id": "14814", "description": "2013 Sprint 04", "name": "2013 Sprint 04", "archived": true, "released": true, "releaseDate": "2013-02-25" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-02-12T20:05:21.000+0000", "created": "2012-10-24T23:56:24.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "parity" ], "versions": [], "issuelinks": [ { "id": "22263", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "91774", "key": "TIDOC-626", "fields": { "summary": "iOS: Couldn't find documentation about why 'focus' event on window is not called after resume", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "23406", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "inwardIssue": { "id": "98957", "key": "TIMOB-10373", "fields": { "summary": "TiAPI: event system: Event ordering", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } }, { "id": "23405", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "98957", "key": "TIMOB-10373", "fields": { "summary": "TiAPI: event system: Event ordering", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-03-27T22:29:09.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "This was filed as a doc bug (see linked issue) with the justification that this was the expected behavior on iOS. However, the Android behavior does not match--blur and focus are fired on the window when the app is paused and restarted. \r\n\r\nBefore we address this in docs, I think we need an architectural decision on the correct behavior.\r\n\r\n### Original Bug Description\r\n\r\n*Issue of the customer:*\r\nIt seems the focus event does not get called on the active tab window when an app is resumed.\r\n\r\nFor example:\r\n\r\n1.I load my app, and the window in tab 1 triggers on the focus event\r\n2.I then background my app, without leaving this window\r\n3.I then move the app back to the foreground. Even though the window now has focus, the focus event is not fired.\r\n\r\nIs this by design or an issue? It seems that the focus event should fire as it is receiving focus again.\r\n\r\n*Attached sample code to reproduce this issue:*\r\napp.js: http://pastebin.com/1x8KJNXL\r\ntest.js: http://pastebin.com/ShaypcYE\r\n\r\n\r\n*Summarized reply from platform team:*\r\nThis is the expected behavior, it is by design. When you put an app into background, it is using the underlying pause/resume feature of iOS, this causes the 'focus' event not to trigger when you put it back into the foreground.\r\n\r\n\r\n*Reason why I created this ticket:*\r\nThis isn't documented anywhere, at least I was unable to find anything when searching the wiki. It would be nice if this would be documented somewhere and easy to find, for future reference.", "attachment": [], "flagged": false, "summary": "Ti API: iOS 'focus' event on window is not called after resume", "creator": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "230246", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "iOS does not fire focus on resume because it never fires blur on pause. This is an event parity problem and should be discussed and addressed as part of TIMOB-10373", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-06T18:34:24.000+0000", "updated": "2012-12-06T18:34:24.000+0000" }, { "id": "230247", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "On Android window state events are tied to activity/app lifecycle but on iOS they are not. When addressing TIMOB-10373 we should discuss if iOS should follow similar behavior", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-06T18:36:14.000+0000", "updated": "2012-12-06T18:36:14.000+0000" }, { "id": "238195", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "On iOS the focus blur events are tied to the view(Will/Did)Appear and view(Will/Did)Disappear methods. \r\n\r\nWhen the app is backgrounded and resumed these methods are not called and hence no blur/focus events are fired. ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-12T20:05:21.000+0000", "updated": "2013-02-12T20:05:21.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }