{ "id": "119660", "key": "TIMOB-15078", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-09-12T19:53:35.000+0000", "created": "2013-09-07T13:13:10.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios7", "module_window", "qe-testadded", "triage" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-22T09:54:50.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": "When I try to close a modal Window, it have no animation and put a **WARN** in console:\r\n\r\n**The top View controller is not a container controller. This window will open behind the presented controller.**\r\n\r\nExample code:\r\n\r\n{code}\r\nvar win1 = Ti.UI.createWindow({\r\n\tbackgroundColor: \"#FF00FF\",\r\n\ttitle: \"Window 1\"\r\n});\r\n\r\nvar navWindow = Ti.UI.iOS.createNavigationWindow({\r\n\twindow: win1\r\n});\r\n\r\nnavWindow.open();\r\n\r\nwin1.addEventListener(\"focus\", function() {\r\n\talert(\"win1 focused\");\r\n});\r\n\r\nwin1.addEventListener(\"click\", function() {\r\n\tvar buttonClose = Ti.UI.createButton({\r\n\t\ttitle: \"Close\"\r\n\t});\r\n\r\n\tvar win2 = Ti.UI.createWindow({\r\n\t\tleftNavButton: buttonClose,\r\n\t\tbackgroundColor: \"#FFFF00\",\r\n\t\ttitle: \"Window 2\"\r\n\t});\r\n\t\r\n\tvar navWindow2 = Ti.UI.iOS.createNavigationWindow({\r\n\t\tmodal: true,\r\n\t\twindow: win2\r\n\t});\r\n\r\n\tnavWindow2.open();\r\n\t\r\n\tbuttonClose.addEventListener(\"click\", function() {\r\n\t\tnavWindow2.close();\r\n\t});\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS7: Modal Window is not closing correctly", "creator": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "subtasks": [], "reporter": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "environment": "iOS 7, Titanium SDK 3.1.3.v20130904134612", "comment": { "comments": [ { "id": "270517", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master https://github.com/appcelerator/titanium_mobile/pull/4663\r\n3_1_X https://github.com/appcelerator/titanium_mobile/pull/4664", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-10T01:44:50.000+0000", "updated": "2013-09-10T01:44:50.000+0000" }, { "id": "270536", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed for 3_1_X and PR merged.\r\nFR passed for master and PR merged.", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-10T04:14:54.000+0000", "updated": "2013-09-10T04:14:54.000+0000" }, { "id": "270546", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the Fix with:\r\n\r\nAppc Studio: 3.1.3.201309072408\r\nSdk:3.1.3.v20130909192251\r\nCLI version : 3.1.2\r\nAlloy : 1.2.2-beta\r\nMAC OSX: 10.8.4\r\nXCode : 5beta6\r\nDevice: Ipad3(v7)\r\n\r\nModal window now closes without warning.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-10T06:53:38.000+0000", "updated": "2013-09-10T06:53:38.000+0000" }, { "id": "270572", "author": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Thanks!\r\n\r\nCould someone explain why modal window is not closing with animation? I don't get it.", "updateAuthor": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2013-09-10T14:30:51.000+0000", "updated": "2013-09-10T14:30:51.000+0000" }, { "id": "270762", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "Rafael: You need to specify {animated:true} in the your close() method.\r\n\r\n{code}\r\nnavWindow2.close({animated:true});\r\n{code}\r\n", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2013-09-11T16:21:25.000+0000", "updated": "2013-09-11T16:21:25.000+0000" }, { "id": "270763", "author": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Kosso: It doesn't work for me. It works to you?", "updateAuthor": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2013-09-11T16:25:36.000+0000", "updated": "2013-09-11T16:25:36.000+0000" }, { "id": "270789", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "Hi Rafael: Sorry. You're absolutely right. \r\n\r\nNow that I've tried to actually implement the new NavigationWindow for a modal window, I cannot get it to close with an animation, despite the setting. ", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2013-09-11T20:11:56.000+0000", "updated": "2013-09-11T20:11:56.000+0000" }, { "id": "270813", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Will verify and report back. ", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-12T01:38:47.000+0000", "updated": "2013-09-12T01:38:47.000+0000" }, { "id": "270852", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "master - https://github.com/appcelerator/titanium_mobile/pull/4677\r\n3_1_X - https://github.com/appcelerator/titanium_mobile/pull/4678", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-12T15:30:37.000+0000", "updated": "2013-09-12T15:30:37.000+0000" }, { "id": "270853", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~rafaelks],[~kosso]\n\nThe problem is that the view of the navigationController was being prematurely detached (windowWillClose) and hence the close() functionality appeared to be non animated. The `animated` parameter is true by default for closing modal windows so you need not specify it.\nHave moved the detaching of views to windowDidClose method, which is called after the modal window is dismissed. Should be fixed after the above two PR's are merged.\n\nThanks for catching that.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-12T15:36:48.000+0000", "updated": "2013-09-12T15:36:48.000+0000" }, { "id": "270854", "author": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Thank you for your fast feedback Vishal! :-)\r\n\r\nWaiting for new Titanium SDK build to test it.", "updateAuthor": { "name": "rafaelks", "key": "rafaelks", "displayName": "Rafael Kellermann Streit", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2013-09-12T15:40:25.000+0000", "updated": "2013-09-12T15:40:25.000+0000" }, { "id": "271101", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce the WARN message using the provided test sample and setting also all windows to modal.\n\nVerified as fixed.\nTiSDK 3.1.3.v20130912171547\nXcode 5 on iPad Mini 7 and iPhone iOS 7 simulator\n\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-13T20:36:35.000+0000", "updated": "2013-09-13T20:36:35.000+0000" }, { "id": "274785", "author": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "body": "As far as I can tell this issue still exists in 3.1.3 with NavigationWindows as mentioned by @kosso.\r\n", "updateAuthor": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-10-11T14:48:29.000+0000", "updated": "2013-10-11T14:48:29.000+0000" }, { "id": "274788", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mrlundis] is this with the same sample code as shown above?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-11T15:18:29.000+0000", "updated": "2013-10-11T15:18:29.000+0000" }, { "id": "274791", "author": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "body": "The example code above appears to work, but I'm experiencing the same issue with code generated through Alloy. At first glance the code appears to be comparable, but I have some more things going on though, like an opened keyboard, etc. \r\n\r\nI'll try to figure out what's causing this and try to extract another sample illustrating the issue.", "updateAuthor": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-10-11T15:31:27.000+0000", "updated": "2013-10-11T15:31:27.000+0000" }, { "id": "274793", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If you can file the Alloy sample, that might be enough for us to go on.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-11T15:52:17.000+0000", "updated": "2013-10-11T15:52:17.000+0000" }, { "id": "277662", "author": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "body": "I've done some more testing now, and it appears like the animation runs after all. The duration seemed to be extremely short however. Most likely because of to many other things happening on the main thread at the same time, delaying the start of the animation, causing it to appear almost instantaneous.\r\n\r\nI fixed the issue by waiting for the rendering of the view below to complete before closing the modal window.", "updateAuthor": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-01T11:49:36.000+0000", "updated": "2013-11-01T11:49:36.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }