{ "id": "111822", "key": "TIMOB-13236", "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": "2016-10-18T20:07:21.000+0000", "created": "2013-03-28T08:48:47.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-3.1.0" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-24T17:59:26.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": "Parent window is closed leaving the child window open.\r\nThis is not regression since the issue occurs in 3.0.2 GA as well.\r\n\r\nSteps to reproduce:\r\n1. Create an app using the code below and execute on IOS device.\r\n2. Click on 'Test1' button.\r\n3. Click on 'open win2' 2 times.\r\n4. Click on 'close Windows'.\r\n\r\nActual:\r\nGreen window(parent window) is closed while win2(purple window) is still open.\r\n\r\nExpected:\r\nAll windows should be closed when parent window is closed.\r\n\r\n\r\n{code}\r\n\r\n//app.js\r\n\r\nvar window1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n \r\n\t\tvar btn1=Ti.UI.createButton({\r\n\t\t\ttop:20,\r\n\t\t\ttitle:'Test1'\r\n\t\t});\t\r\n\t\twindow1.add(btn1);\r\n\t\t\r\n\t\t\r\n\t\tvar win=Ti.UI.createWindow({\r\n\t\t\ttop: 0,\r\n\t\t\tright: 0,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: 0,\r\n\t\t\tbackgroundColor: 'white'\r\n\t\t});\r\n\t\t\r\n\t\tvar animWin2;\r\n\t\tvar animWin3;\r\n\t\t\r\n\t\tbtn1.addEventListener('click',function(){\r\n\t\t\tanimWin2 = true;\r\n\t\t\tanimWin3 = true;\r\n\t\t\tOpenWindow();\t\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tvar win2 = null;\r\n\t\tvar win3 = null;\r\n\t\t\t\r\n\t\tfunction OpenWindow() {\r\n\r\n\t\t\twin.open();\r\n\t\t\tloadWindow();\r\n\t\t\t\r\n\t\t\tTi.Gesture.addEventListener('orientationchange', function() {\r\n\t\t\t\tif (win2) {\r\n\t\t\t\t\tTi.API.error('before: height: ' + win2.height);\r\n\t\t\t\t\tTi.API.error('before: size.height: ' + win2.size.height);\r\n\t\t\t\r\n\t\t\t\t\tvar ht = Ti.Platform.displayCaps.platformHeight - 400;\r\n\t\t\t\t\tTi.API.error('ht: ' + ht);\r\n\t\t\t\r\n\t\t\t\t\twin2.height = ht;\r\n\t\t\t\r\n\t\t\t\t\tTi.API.error('after: height: ' + win2.height);\r\n\t\t\t\t\tTi.API.error('after: size.height: ' + win2.size.height);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tfunction loadWindow() {\r\n\r\n\t\t\tvar header = Ti.UI.createWindow({\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tright: 0,\r\n\t\t\t\tleft: 0,\r\n\t\t\t\theight: 200,\r\n\t\t\t\tbackgroundColor: 'green'\r\n\t\t\t});\r\n\t\t\twin.add(header);\r\n\t\t\r\n\t\t\tvar btn1 = Ti.UI.createButton({\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tleft: 0,\r\n\t\t\t\twidth: 100,\r\n\t\t\t\theight: 50,\r\n\t\t\t\ttitle: 'open win2'\r\n\t\t\t});\r\n\t\t\tbtn1.addEventListener('click', function() {\r\n\t\t\t\tvar ht = Ti.Platform.displayCaps.platformHeight - 400;\r\n\t\t\t\twin2 = Ti.UI.createWindow({\r\n\t\t\t\t\tleft: 0,\r\n\t\t\t\t\ttop: 200,\r\n\t\t\t\t\twidth: '100%',\r\n\t\t\t\t\theight: ht,\r\n\t\t\t\t\tbackgroundColor: 'purple',\r\n\t\t\t\t\topacity: animWin2 ? 0 : 1,\r\n\t\t\t\t\turl: 'win2.js'\r\n\t\t\t\t});\r\n\t\t\t\tif (animWin2) {\r\n\t\t\t\t\twin2.open({\r\n\t\t\t\t\t\topacity: 1,\r\n\t\t\t\t\t\tduration: 1000,\r\n\t\t\t\t\t}, function() {\r\n\t\t\t\t\t\twin2.opacity = 1;\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\twin2.open();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\theader.add(btn1);\r\n\t\t\r\n\t\t\tvar btn2 = Ti.UI.createButton({\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tleft: 150,\r\n\t\t\t\twidth: 100,\r\n\t\t\t\theight: 50,\r\n\t\t\t\ttitle: 'open win3'\r\n\t\t\t});\r\n\t\t\tbtn2.addEventListener('click', function() {\r\n\t\t\t\tif (animWin3) {\r\n\t\t\t\t\twin3.open({\r\n\t\t\t\t\t\topacity: 1,\r\n\t\t\t\t\t\tduration: 1000,\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\twin3.open();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\theader.add(btn2);\r\n\t\t\r\n\t\t\tvar btn3 = Ti.UI.createButton({\r\n\t\t\t\ttop: 100,\r\n\t\t\t\tleft: 0,\r\n\t\t\t\twidth: 150,\r\n\t\t\t\theight: 50,\r\n\t\t\t\ttitle: 'Close Windows'\r\n\t\t\t});\r\n\t\t\tbtn3.addEventListener('click', function() {\r\n\t\t\t\twin.close();\r\n\t\t\t\twin2.close();\r\n\t\t\t\twin3.close();\r\n\t\t\t});\r\n\t\t\theader.add(btn3);\r\n\t\t\r\n\t\t\twin3 = Ti.UI.createWindow({\r\n\t\t\t\ttop: '50%',\r\n\t\t\t\tleft: '50%',\r\n\t\t\t\twidth: 100,\r\n\t\t\t\theight: 100,\r\n\t\t\t\tbackgroundColor: 'yellow',\r\n\t\t\t\topacity: animWin3 ? 0 : 1,\r\n\t\t\t\turl: 'win3.js',\r\n\t\t\t});\r\n\t\t}\r\n\t\twindow1.open()\r\n\t\r\n//win2.js\r\n\r\nvar win = Ti.UI.currentWindow;\r\nvar lbl = Ti.UI.createLabel({\r\n\ttop: 100,\r\n\tleft: 100,\r\n\twidth: 100,\r\n\theight: 50,\r\n\ttext: 'Window 2'\r\n});\r\nwin.add(lbl);\r\n\r\n//win3.js\r\n\r\nvar win = Ti.UI.currentWindow;\r\nvar lbl = Ti.UI.createLabel({\r\n\ttop: 0,\r\n\tleft: 0,\r\n\twidth: 100,\r\n\theight: 50,\r\n\ttext: 'Window 3'\r\n});\r\nwin.add(lbl);\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Window - Parent window is closed leaving the child window open", "creator": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 3.1.0.v20130327135307\r\nStudio:3.0.2.201302191606\r\nDevice: iPad mini(v 6.0)\r\nOS: OSX 10.7.5", "comment": { "comments": [ { "id": "399289", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Windows should not be handled through opacity and Window references should be done with the {{require}} method instead of the deprecated {{url}} property. Use {{myWindow.close()}} to \"hide\" windows instead, thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-18T20:07:21.000+0000", "updated": "2016-10-18T20:07:21.000+0000" }, { "id": "415604", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T17:59:26.000+0000", "updated": "2017-03-24T17:59:26.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }