{ "id": "88574", "key": "TIMOB-8222", "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": "16270", "description": "2014 Sprint 10", "name": "2014 Sprint 10", "archived": true, "released": true, "releaseDate": "2014-05-22" }, { "id": "16271", "description": "2014 Sprint 10 SDK", "name": "2014 Sprint 10 SDK", "archived": true, "released": true, "releaseDate": "2014-05-22" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-05-12T23:24:06.000+0000", "created": "2012-03-23T08:40:56.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tabgroup", "qe-closed-3.3.0", "qe-testadded", "regression" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "43961", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "136274", "key": "TIMOB-17656", "fields": { "summary": "iOS: Open event for window on first tab of tab group fires when it shouldn't", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15910", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "88498", "key": "TIMOB-8192", "fields": { "summary": "Android: Open events do not fire for windows on tabs", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-12-10T04:43:27.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": "In Kitchen Sink, the open event for the window attached to the first tab will fire when the tab group is opened even if the active tab when opened is the second tab. This can be seen by using the test case in timob-8192 (assumes 8192 is merged into master).\r\n\r\nThe open event in the situation described above should not fire.", "attachment": [], "flagged": false, "summary": "Android: Open event for window on first tab of tab group fires when it shouldn't", "creator": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 104, "state": "closed", "name": "2014 Sprint 10 SDK", "startDate": "2014-05-12T16:00:00.000Z", "endDate": "2014-05-24T00:00:00.000Z", "completeDate": "2014-05-27T18:11:47.424Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "293342", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "\r\nWhen the tabs are added, it is handled in the javascript until open is called which then calls setTabs from javascript. Added code in javascript to handle setActiveTab before tab is opened.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5356", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-15T17:51:41.000+0000", "updated": "2014-02-15T17:51:41.000+0000" }, { "id": "300378", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Test case\nSee that setActiveTab and getActiveTab doesn't work until the tab is opened.\n\n // this sets the background color of the master UIView (when there are no windows/tab groups on it)\n\tTitanium.UI.setBackgroundColor('#000');\n\t \n\t// create tab group\n\tvar tabGroup = Titanium.UI.createTabGroup();\n\t \n\t \n\t//\n\t// create base UI tab and root window\n\t//\n\tvar win1 = Titanium.UI.createWindow({ \n\t title:'Tab 1',\n\t backgroundColor:'#fff'\n\t});\n\t \n\twin1.addEventListener('open', function(){\n\t alert('win1 open event fired');\n\t});\n\t \n\tvar tab1 = Titanium.UI.createTab({ \n\t icon:'KS_nav_views.png',\n\t title:'Tab 1',\n\t window:win1\n\t});\n\t \n\tvar label1 = Titanium.UI.createLabel({\n\t color:'#999',\n\t text:'I am Window 1',\n\t font:{fontSize:20,fontFamily:'Helvetica Neue'},\n\t textAlign:'center',\n\t width:'auto'\n\t});\n\t \n\twin1.add(label1);\n\t \n\t//\n\t// create controls tab and root window\n\t//\n\tvar win2 = Titanium.UI.createWindow({ \n\t title:'Tab 2',\n\t backgroundColor:'#fff'\n\t});\n\t \n\twin2.addEventListener('open', function(){\n\t alert('win2 open event fired');\n\t});\n\t \n\tvar tab2 = Titanium.UI.createTab({ \n\t icon:'KS_nav_ui.png',\n\t title:'Tab 2',\n\t window:win2\n\t});\n\t \n\tvar label2 = Titanium.UI.createLabel({\n\t color:'#999',\n\t text:'I am Window 2',\n\t font:{fontSize:20,fontFamily:'Helvetica Neue'},\n\t textAlign:'center',\n\t width:'auto'\n\t});\n\t \n\twin2.add(label2);\n\t \n\t \n\t \n\t//\n\t// add tabs\n\t//\n\ttabGroup.addTab(tab1); \n\ttabGroup.addTab(tab2); \n\t \n\ttabGroup.setActiveTab(1);\n\talert(tabGroup.getActiveTab());\n\t// open tab group\n\ttabGroup.open();", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-09T17:17:31.000+0000", "updated": "2014-04-09T17:17:31.000+0000" }, { "id": "303713", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. The event listener for the expected window is fired when the app is launched & tabgroup is opened.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.3.0.201405011408\r\nTi SDK : 3.3.0.v20140502133323\r\nMac OSX : 10.8.5\r\nAlloy : 1.4.0-dev\r\nCLI - 3.3.0-dev\r\nGalaxy S5 - android 4.4.2", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-06T21:59:03.000+0000", "updated": "2014-05-06T21:59:03.000+0000" }, { "id": "303731", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening the ticket. I guess I made a mistake in understanding the ticket. \r\nUsed the code in the ticket to test.\r\n\r\nWith sdk 3.3.0.v20140502133323 i see that the active tab on launch is tab 1 & not tab 2 as set in the code & both the open events are fired first for win 2 & second for win 1.\r\n\r\nWith sdk 3.2.3.GA , it works as expected. On launch the active tab is tab2 & we see the win2 open event fired after tapping on tab1 the win1 open event is fired.\r\n\r\nEnvironment:\r\nAppc Studio : 3.3.0.201405011408\r\nTi SDK : 3.3.0.v20140502133323\r\nMac OSX : 10.8.5\r\nAlloy : 1.4.0-dev\r\nCLI - 3.3.0-dev\r\nGalaxy S5 - android 4.4.2", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-06T23:05:46.000+0000", "updated": "2014-05-06T23:05:46.000+0000" }, { "id": "304464", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5674", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-05-12T22:13:17.000+0000", "updated": "2014-05-12T22:13:17.000+0000" }, { "id": "305014", "author": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified the fix on:\r\nOSX: 10.9.2\r\nXcode: 5.1.1\r\nStudio - 3.3.0.201405121247\r\nSDK -3.3.0.v20140514163013\r\nacs-1.0.14\r\nalloy-1.4.0-alpha\r\nnpm-1.3.2\r\ntitanium-3.3.0-dev\r\ntitanium-code-processor-1.1.1\r\nDevice: Nexus 5 (4.4.2)\r\n\r\nSetActiveTab(1) opens tab 2 first which is expected behaviour", "updateAuthor": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-05-15T08:41:04.000+0000", "updated": "2014-05-15T08:41:04.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }