{ "id": "123273", "key": "TIMOB-15898", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-12-05T21:43:41.000+0000", "created": "2013-12-05T10:43:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T20:36:25.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem Description\r\nSteps to reproduce\r\n1.Run following code \r\n\r\nExpected result:\r\n\r\nfocus event should be fired on first focus.\r\nActual result:\r\n\r\nNo focus event fired on tab 1\r\nh4. Test case\r\n{code}\r\nvar win1 = Ti.UI.createWindow({\r\n title: 'Win 1'\r\n});\r\n \r\nvar tab1 = Ti.UI.createTab({ \r\n title: 'Tab 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: 'Tab 2',\r\n window: win2\r\n});\r\n \r\nvar tabGroup = Ti.UI.createTabGroup({\r\n \r\n});\r\n \r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\ntabGroup.addEventListener('focus', function(e) {\r\n Ti.API.info('--------------------Focus tab index: ' + e.index);\r\n});\r\n\r\n{code}\r\n\r\n\r\n\r\nBut if we press tab2 and then tab1 this works fine as expected.", "attachment": [], "flagged": false, "summary": "iOS: TabGroup focus event is not fired on first focus", "creator": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "CLI version 3.1.2, \r\nTitanium SDK version: 3.1.3 \r\nTitanium Studio, build: 3.1.1.201306112235\r\nandroid Device: samsung sduos sdk 4.0.4\r\n OSX 10.8.3\r\n", "comment": { "comments": [ { "id": "282711", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Add focus and open listeners before calling open", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-05T21:43:41.000+0000", "updated": "2013-12-05T21:43:41.000+0000" }, { "id": "282712", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "always add focus event before calling open \nInvalid.\n{code}\nvar win1 = Ti.UI.createWindow({\n title: 'Win 1'\n});\n \nvar tab1 = Ti.UI.createTab({ \n title: 'Tab 1',\n window: win1\n});\n \nvar win2 = Ti.UI.createWindow({\n title: 'Win 2'\n});\n \nvar tab2 = Ti.UI.createTab({ \n title: 'Tab 2',\n window: win2\n});\n \nvar tabGroup = Ti.UI.createTabGroup({\n \n});\n \ntabGroup.addTab(tab1);\ntabGroup.addTab(tab2);\n\ntabGroup.addEventListener('focus', function(e) {\n Ti.API.info('--------------------Focus tab index: ' + e.index);\n});\ntabGroup.open();\n{code}", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-05T21:43:48.000+0000", "updated": "2013-12-05T21:43:48.000+0000" }, { "id": "282790", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Same testcase works as expected on android, that is made me confused. Thank you.", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-06T04:37:19.000+0000", "updated": "2013-12-06T04:37:19.000+0000" }, { "id": "413938", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T20:36:25.000+0000", "updated": "2017-03-20T20:36:25.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }