{ "id": "87017", "key": "TIMOB-7820", "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": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13170", "name": "Sprint 2012-06", "archived": true, "released": true, "releaseDate": "2012-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-05T03:48:21.000+0000", "created": "2012-02-27T10:37:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tabgroup", "parity", "qe-ios021312", "qe-testadded" ], "versions": [ { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-05T03:48:21.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": "Steps to reproduce:\r\n1. Run following code:\r\n{code:title=app.js}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n\tname: \"win 1\"\r\n});\r\nvar tab1 = Ti.UI.createTab({\r\n\tname: \"Tab 1\",\r\n\ttitle:'Tab 1',\r\n\twindow:win1\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n\tname: \"win 2\",\r\n\ttitle:'Tab 2',\r\n\tbackgroundColor:'#fff'\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n\tname: \"Tab 2\",\r\n\ttitle:'Tab 2',\r\n\twindow:win2\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\ntabGroup.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tabGroup focus event fired! - ' + e.source.name);\r\n});\r\ntab1.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tab1 focus event fired! - ' + e.source.name);\r\n});\r\ntab2.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tab2 focus event fired! - ' + e.source.name);\r\n});\r\nwin1.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> win1 focus event fired! - ' + e.source.name);\r\n});\r\nwin2.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> win2 focus event fired! - ' + e.source.name);\r\n});\r\n\r\ntab1.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> tab1 blur event fired! - ' + e.source.name);\r\n});\r\ntab2.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> tab2 blur event fired! - ' + e.source.name);\r\n});\r\nwin1.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> win1 blur event fired! - ' + e.source.name);\r\n});\r\nwin2.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> win2 blur event fired! - ' + e.source.name);\r\n});\r\n\r\ntabGroup.open();\r\n{code}\r\n\r\nActual: After initial launch of code, focus event is fired 3 times for tabGroup and 2 times for tab:\r\n{code:xml}\r\nFeb 27 10:26:42 unknown UIKitApplication:com.monkey.test[0x2b31][16642] : [INFO] -------------> tabGroup focus event fired! - undefined\r\nFeb 27 10:26:42 unknown UIKitApplication:com.monkey.test[0x2b31][16642] : [INFO] -------------> tabGroup focus event fired! - undefined\r\nFeb 27 10:26:42 unknown UIKitApplication:com.monkey.test[0x2b31][16642] : [INFO] -------------> tab1 focus event fired! - Tab 1\r\nFeb 27 10:26:42 unknown UIKitApplication:com.monkey.test[0x2b31][16642] : [INFO] -------------> tabGroup focus event fired! - undefined\r\nFeb 27 10:26:42 unknown UIKitApplication:com.monkey.test[0x2b31][16642] : [INFO] -------------> tab1 focus event fired! - Tab 1\r\nFeb 27 10:26:42 unknown UIKitApplication:com.monkey.test[0x2b31][16642] : [INFO] -------------> win1 focus event fired! - win 1\r\n{code}\r\n\r\nExpected: Focus event should be fired once similarly when running code on Android:\r\n{code:xml}\r\nI/TiAPI ( 1770): -------------> tab1 focus event fired! - Tab 1\r\nI/TiAPI ( 1770): -------------> tabGroup focus event fired! - Tab 1\r\nI/TiAPI ( 1770): -------------> win1 focus event fired! - win 1\r\n{code}\r\n\r\nNote: Bug still occurs in 1.8.1", "attachment": [], "flagged": false, "summary": "iOS: Events - Focus event is fired multiple times during initial launch of app ", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "SDK build: 1.8.1, 1.8.2.v20120223174636\r\nxcode: 4.2\r\nTitanium Studio, build: 1.0.9.201202141208\r\nDevice: iphone 4s (5.0.1)", "comment": { "comments": [ { "id": "186139", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please note that the following is not a bug on iOS (as far as the ticket is concerned):\r\n\r\n{code}\r\nFeb 27 10:26:42 unknown UIKitApplication:com.monkey.test[0x2b31][16642] : [INFO] -------------> tabGroup focus event fired! - undefined\r\n{code}\r\n\r\nThis is because the source checks for {{e.source.name}}, and the source of the tabgroup \"focus\" event is the tabgroup itself (not the tab). This is a separate parity issue to resolve.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-12T17:26:47.000+0000", "updated": "2012-03-12T17:26:47.000+0000" }, { "id": "186875", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 2.0.0.v20120316093247\r\nTitanium Studio, build: 2.0.0.201203152033\r\nDevice: iPhone4s (V5.0.1)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-16T14:07:21.000+0000", "updated": "2012-03-16T14:07:21.000+0000" }, { "id": "201542", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-05T03:47:20.000+0000", "updated": "2012-07-05T03:47:20.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }