{ "id": "112186", "key": "TIMOB-13363", "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": "15400", "description": "2013 Sprint 08 API", "name": "2013 Sprint 08 API", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15106", "description": "2013 Sprint 08", "name": "2013 Sprint 08", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "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-04-16T18:34:16.000+0000", "created": "2013-04-04T12:59:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.1.0", "qe-closed-3.1.1" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-05-30T01:45:59.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": [], "description": "TabGroup.setActiveTab() does not open the intended tab for the first time.\r\nThis is not regression since the issue occurs on 3.0.2 GA as well.\r\n\r\nSteps to reproduce:\r\n1. Create an app using the code below.\r\n2. Launch the test app. A window with five buttons is opened.\r\n3. Click on 'open activeTab1'.\r\n\r\n\r\nActual:\r\nTab0 is opened.\r\n\r\nExpected:\r\nTab1 should be opened.\r\n\r\n{code}\r\nvar window1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff',\r\n layout:'vertical'\r\n});\r\n\t \r\n\tvar b1 = Ti.UI.createButton({\r\n\t title:'Open activeTab 1',\r\n\t top:5\r\n\t})\r\n\tvar b2 = Ti.UI.createButton({\r\n\t title:'Open activeTab 2',\r\n\t top:5\r\n\t})\r\n\tvar b3 = Ti.UI.createButton({\r\n\t title:'Open activeTab tab1',\r\n\t top:5\r\n\t})\r\n\tvar b4 = Ti.UI.createButton({\r\n\t title:'Open activeTab tab2',\r\n\t top:5\r\n\t})\r\n\tvar b5 = Ti.UI.createButton({\r\n\t title:'Open ',\r\n\t top:5\r\n\t})\r\n\twindow1.add(b1);\r\n\twindow1.add(b2);\r\n\twindow1.add(b3);\r\n\twindow1.add(b4);\r\n\twindow1.add(b5);\r\n\tvar tabGrp = Ti.UI.createTabGroup();\r\n\t \r\n\tvar win0 = Ti.UI.createWindow({\r\n\t title:'TAB 0',\r\n\t backgroundColor:'white'\r\n\t})\r\n\t \r\n\tvar tab0 = Ti.UI.createTab({\r\n\t window:win0,\r\n\t title:'tab0'\r\n\t})\r\n\t \r\n\tvar closeBtn0 = Ti.UI.createButton({\r\n\t title:'CLOSE TABGRP'\r\n\t})\r\n\t \r\n\twin0.add(closeBtn0);\r\n\t \r\n\tvar win1 = Ti.UI.createWindow({\r\n\t title:'TAB 1',\r\n\t backgroundColor:'white'\r\n\t})\r\n\t \r\n\tvar tab1 = Ti.UI.createTab({\r\n\t window:win1,\r\n\t title:'tab1'\r\n\t})\r\n\t \r\n\tvar closeBtn1 = Ti.UI.createButton({\r\n\t title:'CLOSE TABGRP'\r\n\t})\r\n\t \r\n\twin1.add(closeBtn1);\r\n\t \r\n\tvar win2 = Ti.UI.createWindow({\r\n\t title:'TAB 2',\r\n\t backgroundColor:'white'\r\n\t})\r\n\t \r\n\tvar tab2 = Ti.UI.createTab({\r\n\t window:win2,\r\n\t title:'tab2'\r\n\t})\r\n\t \r\n\tvar closeBtn2 = Ti.UI.createButton({\r\n\t title:'CLOSE TABGRP'\r\n\t})\r\n\t \r\n\twin2.add(closeBtn2);\r\n\t \r\n\t \r\n\ttabGrp.tabs = [tab0,tab1,tab2];\r\n\t \r\n\tb1.addEventListener('click',function(){\r\n\t tabGrp.activeTab = 1;\r\n\t tabGrp.open();\r\n\t})\r\n\t \r\n\tb2.addEventListener('click',function(){\r\n\t tabGrp.activeTab = 2;\r\n\t tabGrp.open();\r\n\t})\r\n\t \r\n\tb3.addEventListener('click',function(){\r\n\t tabGrp.activeTab = tab1;\r\n\t tabGrp.open();\r\n\t})\r\n\t \r\n\tb4.addEventListener('click',function(){\r\n\t tabGrp.activeTab = tab2;\r\n\t tabGrp.open();\r\n\t})\r\n\t \r\n\tb5.addEventListener('click',function(){\r\n\t tabGrp.open();\r\n\t})\r\n\t \r\n\tcloseBtn0.addEventListener('click',function(){\r\n\t tabGrp.close();\r\n\t})\r\n\t \r\n\tcloseBtn1.addEventListener('click',function(){\r\n\t tabGrp.close();\r\n\t})\r\n\t \r\n\tcloseBtn2.addEventListener('click',function(){\r\n\t tabGrp.close();\r\n\t})\r\n\t window1.open();\r\n\r\n\t\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: TabGroup - TabGroup.setActiveTab() does not open the intended tab for the first time.", "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": "Tested with:\r\nSDK: 3.1.0.v20130403114957\r\nStudio:3.1.0.201304011603\r\nDevice: LG-p970(2.2.2), Samsung galaxy note(v 2.3.6)\r\nOS: OSX 10.7.5", "comment": { "comments": [ { "id": "246800", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Master PR: https://github.com/appcelerator/titanium_mobile/pull/4136", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-10T00:56:38.000+0000", "updated": "2013-04-10T00:56:38.000+0000" }, { "id": "247632", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4136", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-15T20:52:13.000+0000", "updated": "2013-04-15T20:52:13.000+0000" }, { "id": "252662", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_1_X: https://github.com/appcelerator/titanium_mobile/pull/4291", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T21:46:57.000+0000", "updated": "2013-05-17T21:46:57.000+0000" }, { "id": "254794", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified as fixed with Android Galaxy Nexus 4.2.2\r\n\r\nAppcelerator Studio 3.1.1.201305282349\r\nTitanium SDK 3.1.1.v20130524180421\r\nAlloy 1.1.3-alpha\r\nTitanium-Code-Processor 1.1.3-alpha3\r\n\r\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-30T01:45:59.000+0000", "updated": "2013-05-30T01:45:59.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }