{ "id": "141451", "key": "TIMOB-18187", "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": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-12-11T17:24:05.000+0000", "created": "2014-12-11T07:29:17.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-3.5.0", "regression" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [ { "id": "44132", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "141623", "key": "TIMOB-18209", "fields": { "summary": "iOS: Alert inside a window focus event listener pops up infinitely", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T18:15:25.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6. This is a regression since 3.4.1 works fine.\r\n\r\nFocus event is firing continuously (infinite times) for Ti.UI.Window.\r\n\r\nh5. Steps To Reproduce\r\n1. Create a classic app using following code\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win = Titanium.UI.createWindow({\r\n\ttitle: 'Window 1',\r\n backgroundColor: '#fff'\r\n});\r\n\r\nwin.addEventListener('focus',function(e){\r\n alert('test win');\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\n2. Run the app in iOS device\r\n\r\nh5. Actual Result\r\nFocus event is firing continuously ( infinite times) \r\n\r\nh5. Expected Result\r\nFocus event should fire only once when it's focused.", "attachment": [], "flagged": false, "summary": "iOS: Ti.UI.Window Focus event is firing continuously. ", "creator": { "name": "kvelummaylum", "key": "kvelummaylum", "displayName": "Kajenthiran Velummaylum", "active": true, "timeZone": "Asia/Shanghai" }, "subtasks": [], "reporter": { "name": "kvelummaylum", "key": "kvelummaylum", "displayName": "Kajenthiran Velummaylum", "active": true, "timeZone": "Asia/Shanghai" }, "environment": "Titanium SDK: 3.5.0.v20141210202514\r\nAppc-Studio: 3.4.1 GA\r\nTitanium CLI: 3.4.1 GA\r\nAlloy : 1.5.1 GA\r\nXcode : 6.1\r\nOS: OSX 10.10.1\r\nDevice : iPhone 6plus (iOS 8.1)", "comment": { "comments": [ { "id": "336006", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~bhatfield] expected behavior now, need to be in release notes.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-11T16:02:20.000+0000", "updated": "2014-12-11T16:02:20.000+0000" }, { "id": "336019", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is now expected behavior. On iOS8 AlertDialogs and OptionDialogs are full fledged view controllers. So when they show up, the top most Window proxy will blur. It will regain focus when these dialogs are dismissed. So you have an infinite loop.\r\nTry this code to see discrepancy in behavior on iOS7 and iOS8.\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\nvar win = Titanium.UI.createWindow({\r\n title: 'Window 1',\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar opts = {\r\n cancel: 2,\r\n options: ['Confirm', 'Help', 'Cancel'],\r\n selectedIndex: 2,\r\n destructive: 0,\r\n title: 'Delete File?'\r\n};\r\n\r\nvar optDialog = Ti.UI.createOptionDialog(opts);\r\n\r\nvar aopts = {\r\n message: 'The file has been deleted',\r\n ok: 'Okay',\r\n title: 'File Deleted'\r\n}\r\n\r\nvar aDialog = Ti.UI.createAlertDialog(aopts);\r\n \r\nwin.addEventListener('focus',function(e){\r\n optDialog.show();\r\n //aDialog.show();\r\n});\r\n \r\nwin.addEventListener('blur',function(e){\r\n Ti.API.info('WINDOW BLURRED');\r\n});\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-11T17:22:45.000+0000", "updated": "2014-12-11T17:22:45.000+0000" }, { "id": "414260", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T18:15:25.000+0000", "updated": "2017-03-21T18:15:25.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }