{ "id": "111392", "key": "TIMOB-13111", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-04-15T17:13:31.000+0000", "created": "2013-03-19T12:45:21.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T20:47:20.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": "h2. Problem description\r\nWhen opening a modal windows with animation, if a previous modal is still closing, the opening fails and an error is reported:\r\n\r\n{code}\r\n[ERROR] : \b\b \bScript Error = Attempting to begin a modal transition from to while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed at app.js (line 25).\r\n{code}\r\n\r\nh2. Steps to reproduce\r\n\r\nUse the following code:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'black',\r\n\tfullscreen: true\r\n});\r\n\r\nwin.addEventListener('click', function() {\r\n\topenWin();\r\n});\r\n\r\nwin.open();\r\n\r\nfunction openWin() {\r\n\tvar win = Ti.UI.createWindow({\r\n\t\tbackgroundColor: 'white',\r\n\t\tmodal: true\r\n\t});\r\n\r\n\twin.addEventListener('click', function() {\r\n\t\twin.close();\r\n\t\topenWin();\r\n\t});\r\n\r\n\t// setTimeout(function() {\r\n\t\twin.open({\r\n\t\t\tanimated: true\r\n\t\t});\r\n\t// }, 500);\r\n}\r\n{code}\r\n\r\n1. Run the app: you will see just a black screen\r\n2. Click on the window, and it will open a modal window with animation\r\n3. Click on the new opened window: the error will be shown\r\n\r\nh2. Workaround\r\nBy decommenting the setTimeout lines, when the modal window has finished closing, a new one is open; however, this is not a good workaround, as the time to wait might vary (500ms works fine on my Simulator, for example, while 200ms fails).", "attachment": [], "flagged": false, "summary": "iOS: cannot open a modal window before a previous one is closing (with animation)", "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": "iOS 6.1\r\niOS 5.1\r\nSDK 3.0.2\r\nSDK 3.0.0\r\nSDK 2.1.4", "comment": { "comments": [ { "id": "242899", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "Another note: the same error appears if you try to open the window inside a 'close' event.", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-03-19T12:47:59.000+0000", "updated": "2013-03-19T12:47:59.000+0000" }, { "id": "413961", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T20:47:20.000+0000", "updated": "2017-03-20T20:47:20.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }