{ "id": "63861", "key": "TIMOB-3229", "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": "11257", "description": "", "name": "Sprint-2011-09", "archived": true, "released": true, "releaseDate": "2011-03-07" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T03:40:03.000+0000", "created": "2011-04-15T03:40:00.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect", "focus", "release-1.7.0", "reported-1.6.0", "rplist", "tabGroup", "tabgroup", "tabs" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T19:30:40.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}
Focus events are not firing on tab focus events.
\nTested with 1.6 and Android 2.2.1 on device.
\nTicket Reference: http://developer.appcelerator.com/helpdesk/view/75811
\nTest Code:
\n\nTitanium.UI.setBackgroundColor('#000');\n\nvar tabGroup = Titanium.UI.createTabGroup();\n\nvar win1 = Titanium.UI.createWindow({ \n title:'Tab 1',\n backgroundColor:'#fff'\n});\nvar tab1 = Titanium.UI.createTab({ \n icon:'KS_nav_views.png',\n title:'Tab 1',\n window:win1\n});\n\nvar label1 = Titanium.UI.createLabel({\n color:'#999',\n text:'I am Window 1',\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\n textAlign:'center',\n width:'auto'\n});\n\nwin1.add(label1);\n\nvar win2 = Titanium.UI.createWindow({ \n title:'Tab 2',\n backgroundColor:'#fff'\n});\nvar tab2 = Titanium.UI.createTab({ \n icon:'KS_nav_ui.png',\n title:'Tab 2',\n window:win2\n});\n\nvar label2 = Titanium.UI.createLabel({\n color:'#999',\n text:'I am Window 2',\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\n textAlign:'center',\n width:'auto'\n});\n\nwin2.add(label2);\n\ntab2.addEventListener('focus', function(){\n\nalert('Focus');\n});\n\ntabGroup.addTab(tab1); \ntabGroup.addTab(tab2); \n\ntabGroup.open();
\n
Fixed tags.
Isn't this the \"job\" of tabGroup's focus event? There is no\nfocus event in our tab documentation. Instead, we have tabGroup\nfocus/blur such as this:
\n\ntabGroup.addEventListener('focus', function(e) {\n // e.index contains the index of the tab that just gained focus.\n // e.previousIndex contains the index of the tab that just lost focus.\n});
\n
Correct state of the ticket is invalid.
Adding missing tag.