{ "id": "63705", "key": "TIMOB-3073", "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": "11243", "name": "Release 1.6.0 M10", "archived": true, "released": true, "releaseDate": "2011-02-21" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T03:36:07.000+0000", "created": "2011-04-15T03:36:06.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T19:32:42.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

When I click to reopen a window I get multiple instances of that\nwindow. Either it is being opened twice the 2nd time or never\nreally closed. Please see the example code for a better\nexplanation.

\n

The code below is a simplified version of my project to show the\nerror.

\n

app.js

\n
\n var win1 = Titanium.UI.createWindow({\nbackgroundColor:'#000',\nexitOnClose:true,\nnavBarHidden:true,\norientationModes: [Ti.UI.PORTRAIT],\nzIndex:-1}\n );\n \n win1.open();\n\nvar body = Titanium.UI.createScrollView({\n    right:0,left:0,top:60,bottom:50,width:'auto',height:'auto'\n    });\n    \nvar button = Titanium.UI.createButton({\n    title:'click to open',\n    top:190,\n    left:30,\n    height:50,\n    width:250,\n    font:{fontSize:20}\n});\n\nbody.add(button);\nwin1.add(body);\n\nbutton.addEventListener('click', function(){\n    win3.open();\n    });\n\nvar win3 = Titanium.UI.createWindow({\n    title: 'Window 3',\n    name: 'Window 3',\n    backgroundColor: '#C4D5DA',\n    fullscreen: false,\n    animate: ({opacity: 0,duration: 300 }),\n    url: 'win3.js'\n    });\n
\n

win3.js

\n
\nvar win3 = Titanium.UI.currentWindow;\n\nvar body = Titanium.UI.createScrollView({\n    contentWidth:Titanium.Platform.displayCaps.platformWidth,contentHeight:500,\n    right:0,left:0,top:60,bottom:50,width:'auto',height:'auto',\n    showHorizontalScrollIndicator:false,showVerticalScrollIndicator:false});\n\nwin3.add(body)\n\nvar button = Titanium.UI.createButton({\n    title:'click to close',\n    top:190,\n    left:30,\n    height:50,\n    width:250,\n    font:{fontSize:20}\n});\n\nbody.add(button);\n\nbutton.addEventListener('click', function(){\n\n    win3.close();\n    });\n
{html}", "attachment": [], "flagged": false, "summary": "Reopening a window creates duplicates scrollview", "creator": { "name": "pete", "key": "pete", "displayName": "pete", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pete", "key": "pete", "displayName": "pete", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129987", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Please use Q&A for support issues. You need to create the\nwindow in the button click handler and open it there.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:36:07.000+0000", "updated": "2011-04-15T03:36:07.000+0000" }, { "id": "129988", "author": { "name": "pete", "key": "pete", "displayName": "pete", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Why is this invalid?

{html}", "updateAuthor": { "name": "pete", "key": "pete", "displayName": "pete", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:36:07.000+0000", "updated": "2011-04-15T03:36:07.000+0000" }, { "id": "129989", "author": { "name": "pete", "key": "pete", "displayName": "pete", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I have been trying to get help with this for 2 months now. If it\nis invalid, please tell me why and I will correct my code. My code\nworks just fine with iPhone.

{html}", "updateAuthor": { "name": "pete", "key": "pete", "displayName": "pete", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:36:07.000+0000", "updated": "2011-04-15T03:36:07.000+0000" }, { "id": "408485", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closed as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T19:32:42.000+0000", "updated": "2017-03-02T19:32:42.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }