{ "id": "92947", "key": "TIMOB-9444", "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": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-03-01T12:38:39.000+0000", "created": "2012-06-07T11:26:56.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "parity" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-27T18:30:34.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": "h2. Problem description\r\nWhen calling the open() method of a Ti.UI.Tab object, the window property is set to be the new open window. This does not happen on iOS and, based on the documentation, it is wrong; the doc explains, in fact, that \"window\" is the \"Root level tab window.\"\r\n\r\nh2. Steps to reproduce\r\n1. create a new app with the following code\r\n2. click on 'get active tab window title' button: it displays 'Win 1'\r\n3. click on 'Open subwindow': a new window is open, replacing the tabgroup as explained in the docs\r\n4. click back, and press again 'get active tab window title': the alert now displays 'Win 1a', which is not the right one.\r\n\r\n{code}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\nvar win1 = Ti.UI.createWindow ({\r\n title: \"Win 1\",\r\n layout: \"vertical\"\r\n});\r\n\r\nvar btn1 = Ti.UI.createButton ({\r\n title: 'Open subwindow',\r\n top: 20\r\n});\r\n\r\nbtn1.addEventListener ('click', function (e) {\r\n var win1a = Ti.UI.createWindow ({\r\n title: \"Win 1a\"\r\n });\r\n tabGroup.getActiveTab().open (win1a);\r\n});\r\n\r\nwin1.add (btn1);\r\n\r\nvar btn2 = Ti.UI.createButton ({\r\n title: 'get active tab window title',\r\n top: 20,\r\n});\r\n\r\nbtn2.addEventListener ('click', function (e) {\r\n var t = tabGroup.getActiveTab().getWindow ().title;\r\n alert (t);\r\n});\r\n\r\nwin1.add (btn2);\r\n\r\nvar tab1 = Ti.UI.createTab({ \r\n title:'Win 1',\r\n window: win1\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow ({\r\n title: \"Win 2\"\r\n});\r\n\r\nvar tab2 = Ti.UI.createTab({ \r\n title:'Win 2',\r\n window: win2\r\n});\r\n\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code}\r\n\r\nh2. Expected result\r\nClicking on 'get active tab window title' after the subwindow is opened, should display 'Win 1'.\r\n\r\nh2. Additional notes\r\nCustomer's ticket: http://support.appcelerator.com/tickets/APP-314357", "attachment": [], "flagged": false, "summary": "Android: Ti.UI.Tab.open() should not set the window property", "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": null, "comment": { "comments": [ { "id": "240349", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem cannot reproduce with release 3.0.2 and master 3.1.0\r\n\r\nTested on:\r\nTitanium Studio, build: 2.1.2.201208301612\r\nTitanium SDK version: 3.1.0 (01/03/2013)\r\nTitanium SDK version: 3.0.2 (01/03/2013)\r\nDevice: Samsung galaxy s duos Android version: 4.0.4", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-01T12:38:39.000+0000", "updated": "2013-03-01T12:39:00.000+0000" }, { "id": "415904", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as I am unable to reproduce this issue with the following environment;\r\nPixel (7.1)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.0.3 GA\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nTi CLI 5.0.11\r\nAlloy 1.9.5\r\nArrow 1.10.1\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-27T18:30:34.000+0000", "updated": "2017-03-27T18:30:34.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }