{ "id": "120783", "key": "TIMOB-15412", "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": null, "resolutiondate": null, "created": "2013-10-03T21:50:01.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "15747", "description": "Release 3.1.4", "name": "Release 3.1.4", "archived": true, "released": false } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:11.000+0000", "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" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem Description\r\nI have test this issue with provided test code. I got this bug. When I clicked on tab its not firing focus event. But when I removed playerWindow.open() its working well. It’s working well for 3.1.2 GA and 3.1.1 GA. \r\n\r\nh4. Test case\r\n{code}\r\nfunction ApplicationTabGroup(Window) {\r\n\t//create module instance\r\n\tvar self = Ti.UI.createTabGroup();\r\n\r\n\tvar topWindow = Ti.UI.createWindow({\r\n\t\twidth : '100%',\r\n\t});\r\n\t//create app tabs\r\n\tvar win1 = new Window(L('home')), win2 = new Window(L('settings'));\r\n\r\n\tvar tab1 = Ti.UI.createTab({\r\n\t\ttitle : L('home'),\r\n\t\ticon : '/images/KS_nav_ui.png',\r\n\t\twindow : win1\r\n\t});\r\n\twin1.containingTab = tab1;\r\n\r\n\tvar tab2 = Ti.UI.createTab({\r\n\t\ttitle : L('settings'),\r\n\t\ticon : '/images/KS_nav_views.png',\r\n\t\twindow : win2\r\n\t});\r\n\twin2.containingTab = tab2;\r\n\r\n\tself.addTab(tab1);\r\n\tself.addTab(tab2);\r\n\r\n\tself.addEventListener('open', function(e) {\r\n\r\n\t\tvar playerWindow = Ti.UI.createWindow({\r\n\t\t\twidth : '100%',\r\n\t\t\theight : 150,\r\n\t\t\tbottom : 0,\r\n\t\t\tbackgroundColor : '#e5e5e5',\r\n\t\t\tvisible : false,\r\n\t\t\tlayout : 'vertical',\r\n\t\t\tzIndex : 100\r\n\t\t});\r\n\t\tplayerWindow.open();\r\n\t});\r\n\ttab1.addEventListener('focus', function(e) {\r\n\t\talert('1 Focus');\r\n\t});\r\n\r\n\ttab2.addEventListener('focus', function(e) {\r\n\t\talert('2 Focus - this should fire, but it does not');\r\n\t});\r\n\r\n\treturn self;\r\n};\r\n\r\nmodule.exports = ApplicationTabGroup;\r\n{code}\r\n\r\nh4. Steps to reproduce*\r\n1.\tCreate default tabbed application in Titanium Classic\r\n2.\tOpen ApplicationTabGroup.js file and replace with my test code\r\n3.\tRun this apps\r\n4.\tClick on settings tab, focus event not firing \r\n5.\tNow change Ti SDK 3.1.3 GA to 3.1.2 GA \r\n6.\tContinue step 3 to 4\r\n7.\tRemove playerWindow.open(); script form test code and follow step 6\r\n", "attachment": [ { "id": "42982", "filename": "app.js", "author": { "name": "pobrejuanito", "key": "pobrejuanito", "displayName": "Ki Song", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-07T14:50:43.000+0000", "size": 753, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Focus events stops working when you create and open a new window before opening of tabgroup", "creator": { "name": "pobrejuanito", "key": "pobrejuanito", "displayName": "Ki Song", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pobrejuanito", "key": "pobrejuanito", "displayName": "Ki Song", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OS: MAC OX X 10.8.5\r\niOS SDK: 7.0,Xcode 5\r\niOS Simulator: 6.0\r\nTi SDK: 3.1.2 GA,3.1.3 GA\r\nTi CLI: 3.1.2", "comment": { "comments": [ { "id": "274000", "author": { "name": "pobrejuanito", "key": "pobrejuanito", "displayName": "Ki Song", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test Case", "updateAuthor": { "name": "pobrejuanito", "key": "pobrejuanito", "displayName": "Ki Song", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-07T14:50:43.000+0000", "updated": "2013-10-07T14:50:43.000+0000" }, { "id": "274001", "author": { "name": "pobrejuanito", "key": "pobrejuanito", "displayName": "Ki Song", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It doesn't work on the latest 3.1.4.v20131002082601 SDK either.", "updateAuthor": { "name": "pobrejuanito", "key": "pobrejuanito", "displayName": "Ki Song", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-07T14:52:53.000+0000", "updated": "2013-10-07T14:52:53.000+0000" }, { "id": "321734", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue exist with TiSDK 3.1.3.GA and 3.4.0 \r\nAppcelerator Studio, build: 3.3.0.201407111535 \r\niOS 7.1", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-04T06:34:19.000+0000", "updated": "2014-09-04T07:07:56.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }