{ "id": "88102", "key": "TIMOB-8067", "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": "2014-04-17T22:12:04.000+0000", "created": "2012-03-16T15:18:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-mw020912", "qe-port" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-17T22:12:04.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" }, { "id": "13719", "name": "Windows Hybrid", "description": "Windows Hybrid platform" } ], "description": "Steps to reproduce:\r\n\r\n1. Create a default mobile web app and change the app.js code to the following:\r\n{code}\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\n2. Run the app\r\n3. Tap between the two tabs\r\n\r\nActual result:\r\nOne focus event is fired with an undefined e.source.name\r\n\r\nExpected result:\r\nFocus events are fired each time a user switches between tabs", "attachment": [], "flagged": false, "summary": "MobileWeb: Window - The focus event isn't firing each time and reports undefined for the source.name", "creator": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested with Ti Studio build 2.0.0.201203152033\r\nTi Mob SDK 2.0.0.v20120316074737 hash r5aa535ab\r\nOSX Lion 10.7.3\r\niPad 1 OS 4.3.5, Galaxy Tab 10.1 OS 3.0", "comment": { "comments": [ { "id": "187191", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note: the undefined e.source.name is expected. When the tabgroup fires a focus event, the source is the tabgroup, which you didn't specify a name for. I confirmed the same behavior on iOS. You can use e.tab to access the focused tab.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T14:22:01.000+0000", "updated": "2012-03-19T14:22:48.000+0000" }, { "id": "187202", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1747", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T14:44:03.000+0000", "updated": "2012-03-19T14:44:03.000+0000" }, { "id": "214497", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fix on:\r\nTitanium studio : 2.1.1.201207271312\r\nSDK version : 2.2.0.v20120814103312\r\nMountain lion(10.8) - chrome 21.0,safari 6,firefox 14.0.1", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T17:06:24.000+0000", "updated": "2012-08-14T17:06:24.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }