{ "id": "102647", "key": "TIMOB-11256", "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": "2012-10-24T22:52:18.000+0000", "created": "2012-10-04T10:48:56.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:35:12.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": "h1. Problem description\r\nOpening a window just after a modal is closed will not work.\r\n\r\nh1. Steps to reproduce\r\nUse the following code to see the issue:\r\n\r\n{code}\r\n(function() {\r\n var mainWindow = Ti.UI.createWindow({\r\n backgroundColor: '#fff',\r\n });\r\n\r\n mainWindow.button = Ti.UI.createButton({\r\n title: 'Open Modal Window'\r\n });\r\n\r\n mainWindow.add(mainWindow.button);\r\n\r\n var modalWindow = Ti.UI.createWindow({\r\n modal: true,\r\n backgroundColor: '#ccc'\r\n });\r\n\r\n modalWindow.button = Ti.UI.createButton({\r\n title: 'Close'\r\n });\r\n\r\n modalWindow.add(modalWindow.button);\r\n\r\n mainWindow.button.addEventListener('click', function(){\r\n modalWindow.open({modalStyle:Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET});\r\n });\r\n\r\n modalWindow.button.addEventListener('click', function(){\r\n modalWindow.close();\r\n\r\n var newWindow = Ti.UI.createWindow({\r\n backgroundColor: 'green'\r\n });\r\n\r\n /* If I delay opening the window I get the behaviour I had prior to this release.\r\n setTimeout(function(){\r\n newWindow.open()\r\n }, 300);*/\r\n\r\n newWindow.open();\r\n });\r\n\r\n mainWindow.open();\r\n\r\n})();\r\n{code}\r\n\r\nh1. Note\r\nThe same code works with SDK 2.1.2; also, commenting newWindow.open() and uncommenting the timeout, works too. It also works removing modal = true\r\n", "attachment": [], "flagged": false, "summary": "iOS: Opening a window just after a modal window is closed fails", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 2.1.3\r\niOS 6", "comment": { "comments": [ { "id": "222534", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This took advantage of a bug in 2.1.2 which was fixed in 2.1.3. We need to document how to do this correctly as a release note.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-08T17:19:21.000+0000", "updated": "2012-10-08T17:19:21.000+0000" }, { "id": "224850", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Open the new window in the modal window close handler\n\n{code}\nmodalWindow.addEventListener('close',function(){\n    var newWindow = Ti.UI.createWindow({\n        backgroundColor: 'green'\n    });\n newWindow.open();\n });\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-24T22:52:00.000+0000", "updated": "2012-10-24T22:52:00.000+0000" }, { "id": "415015", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:35:12.000+0000", "updated": "2017-03-22T21:35:12.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }