{ "id": "119912", "key": "TIMOB-15187", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-09-16T17:59:56.000+0000", "created": "2013-09-13T14:17:01.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios7", "qe-closed-3.1.3", "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-09-17T17:35:28.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\n\r\n# run the attached app.js \r\n# click on the \"open new window\" button\r\n\r\nExpected:\r\n\r\n* The \"focus\" event should be triggered on the newly opened window (new_window)\r\n\r\nActual:\r\n\r\n* The \"focus\" event is not fired\r\n\r\n\r\nAdditional notes:\r\n* The focus event is fired on win1 the first time the tabgroup is presented, but not when closing new_window\r\n* the same example works as expected when built with Ti SDK 3.1.2.GA", "attachment": [ { "id": "42464", "filename": "app.js", "author": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-13T14:17:01.000+0000", "size": 889, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS7: focus event not triggered in window opened in a tab if another non-fullscreen window is overlaid on the tabgroup", "creator": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK, build: 3.1.3.v20130912132758\r\niPhone Simulator iOS 7.0\r\nXcode5-GM\r\nCLI 3.1.2", "comment": { "comments": [ { "id": "271070", "author": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "body": "am seeing this one, too", "updateAuthor": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-13T16:07:05.000+0000", "updated": "2013-09-13T16:07:05.000+0000" }, { "id": "271200", "author": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "body": "I'd like to add that if the tab-group has multiple tabs, switching between tabs correctly triggers the focus event on the window associated to the target tab.\r\nMoreover, after switching tabs at least once, returning to the scenario reported in this ticket (i.e. calling {{tab1.open(new_win);}}) will make the focus event to get fired on the newly opened window.", "updateAuthor": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-16T07:11:04.000+0000", "updated": "2013-09-16T07:11:04.000+0000" }, { "id": "271217", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Current behavior is partially correct. The tabGroup should never fire focus on any of its tabs if it itself does not have focus.\nFixing that bug. The bug reported here is invalid.\n\nTest Code\n{code}\nTitanium.UI.setBackgroundColor('#000');\n\nvar tabGroup = Titanium.UI.createTabGroup();\n\nvar win1 = Titanium.UI.createWindow({ \n title:'Tab 1',\n backgroundColor:'#fff'\n});\n\nwin1.addEventListener('focus', function() {\n Ti.API.info('win1 got focus');\n});\n\nvar tab1 = Titanium.UI.createTab({ \n title:'Tab 1',\n window:win1\n});\n\nvar button = Titanium.UI.createButton({\n title:'open new window',\n width: 200,\n height: 440\n});\n\nwin1.add(button);\n\n\nbutton.addEventListener('click', function() {\n var new_win = Ti.UI.createWindow({\n title: 'new window',\n backgroundColor: '#fff'\n });\n \n \n new_win.addEventListener('focus', function() {\n Ti.API.log('new_win got focus');\n });\n tab1.open(new_win, {animated: true});\n});\n\n\nvar win2 = Titanium.UI.createWindow({ \n title:'Tab 2',\n backgroundColor:'#fff'\n});\n\nwin2.addEventListener('focus', function() {\n Ti.API.info('win2 got focus');\n});\n\nvar tab2 = Titanium.UI.createTab({ \n title:'Tab 2',\n window:win2\n});\n\n\ntabGroup.addTab(tab1); \ntabGroup.addTab(tab2); \n\n\nvar overlay = Ti.UI.createWindow({\n top: 68,\n backgroundColor: 'blue',\n width: 200,\n height: 44\n});\n\noverlay.addEventListener('click',function(){\n overlay.close();\n})\n\n\ntabGroup.open();\n\noverlay.open();\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-16T10:02:32.000+0000", "updated": "2013-09-16T10:02:32.000+0000" }, { "id": "271218", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/4690\r\n3_1_X - https://github.com/appcelerator/titanium_mobile/pull/4691", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-16T10:07:56.000+0000", "updated": "2013-09-16T10:07:56.000+0000" }, { "id": "271241", "author": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi Vishal,\r\nthanks.\r\nI checked out your pull request, and if I understand well, you are implying that the former tabgroup behavior was wrong.\r\nHowever, in the example I attached, I'd say that both the tabgroup and the overlaid window should have focus, since the overlay is not entirely covering the tabgroup: in this case, both elements can receive user input.\r\n\r\n", "updateAuthor": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-16T12:40:29.000+0000", "updated": "2013-09-16T12:40:29.000+0000" }, { "id": "271341", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified that the current behavior is that switching between tabs does not trigger events if the tabGroup does not have focus. \n\nTitanium SDK 3.1.3.v20130916110056\nAlloy 1.2.2-cr\nAppcelerator Studio 3.1.3.201309132456\nCLI 3.1.2.GA\nNode 0.10.13\n\nLeaving the JIRA open for further comments if needed.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-16T20:24:24.000+0000", "updated": "2013-09-16T20:24:24.000+0000" }, { "id": "271457", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix for Vishal's code with the following environment:\r\n\r\nSDK: 3.1.3.v20130916153052\r\nAppcelertaor Studio: 3.1.3.201309132456\r\nOS: OSX 10.8.4\r\nDevice: iPod touch2(iOS7)\r\nXcode: 5.0 GM seed\r\nalloy@1.2.2-cr\r\nCLI version : 3.1.2\r\n\r\nFocus event is being fired successfully in new window", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T11:34:31.000+0000", "updated": "2013-09-17T11:35:20.000+0000" }, { "id": "271513", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~omorandi]\nI understand you point but you have to see it from a SDK point of View. If this app was accessibility enabled, the accessibility elements in the tabGroup and contained windows would not be usable (since we specifically set them to be hidden in resignFocus).\n\nWe should ideally set touch enabled to false when a window resigns focus (which we should fix in 3.2.0)\n\nThe sample attached here is actually using the WindowProxy as a View Proxy. You could just have created a View Proxy and added it as a child of the Tab Group to achieve the same behavior. ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T17:21:49.000+0000", "updated": "2013-09-17T17:21:49.000+0000" }, { "id": "271517", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested Vishal's code and verified focus event fired after overlay window closed.\nAppcelerator Studio: 3.1.3.201309132456\nTitanium SDK, build: 3.1.3.v20130916153052\nMac osx 10.8.4 Mountain Lion\nXcode5\nalloy@1.2.2-cr\nCLI version : 3.1.2\nDevices: \niPad(iOS7 GM seed)\niPhone5 iOS7(11A465)\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T17:34:58.000+0000", "updated": "2013-09-17T17:34:58.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }