{ "id": "91286", "key": "TIMOB-8976", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-11T02:57:30.000+0000", "created": "2012-05-03T12:06:55.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_window", "parity", "qe-testadded" ], "versions": [ { "id": "12571", "description": "CI for 1_7_X", "name": "Release 1.7.6", "archived": true, "released": false }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "17252", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "91804", "key": "TIMOB-9124", "fields": { "summary": "Android: window blur event it's not triggered when going back to the parent window", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "17389", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "91804", "key": "TIMOB-9124", "fields": { "summary": "Android: window blur event it's not triggered when going back to the parent window", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "43325", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "140387", "key": "TIMOB-18075", "fields": { "summary": "iOS: Window focus event is not triggered when switch back from another tab", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "29466", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "115554", "key": "TIMOB-14130", "fields": { "summary": "Android: Window events, windows in the Tab and test", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } }, { "id": "17459", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "92355", "key": "TIMOB-9262", "fields": { "summary": "Android: We need focus and blur events in the lightweight windows", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-24T08:19:47.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem description\r\nFocus eventListener is set in the parent window and it's correctly triggered when opening the window. Moving back from a child window to the parent window does not trigger the Focus event.\r\nThis happens both for heavyweight and lightweight children window from 1.8.2 SDK. On 1.7.6 it is correctly triggered only if the child window is a heavyweight.\r\n\r\nh2. Customer engagement notes\r\nWith the same code on iOS, Focus event it's always triggered.\r\nING will be using Lightweight windows inside a tabGroup and need to have the same behavior, using same code, between iOS and Android.\r\nThis is blocking issue for the customer.\r\n\r\nh2. Code to reproduce\r\nUsing the sample code below, button in win1 opens a Lightweight child window (win3). When win3 it's closed, focus event it's not triggered using all SDK versions.\r\nUncomment line 36 (fullscreen:false) in order to make 'win3' heavyweight. When win3 it's closed, focus event it's triggered only using SDK 1.7.6. With any other higher version it's not.\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nwin1.addEventListener('focus', function(){\r\n\talert('focused!')\r\n});\r\n\r\n\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle:'open win3',\r\n\twidth:200,\r\n\theight:100\r\n});\r\nbutton.addEventListener('click', function(){\r\n\tvar win3 = Ti.UI.createWindow({\r\n\t\ttitle:'foobar',\r\n\t\tbackgroundColor:'blue',\r\n\t\t// fullscreen:false\r\n\t});\r\n\tvar button2 = Ti.UI.createButton({\r\n\t\ttitle:'back to win1',\r\n\t\twidth:200,\r\n\t\theight:100,\r\n\t\tbackgroundColor:'white'\r\n\t});\r\n\tbutton2.addEventListener('click', function(){\r\n\t\twin3.close()\r\n\t});\r\n\twin3.add(button2);\r\n\t\r\n\r\n\twin3.open();\r\n});\r\n\r\nwin1.add(button);\r\n\r\n\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\ntabGroup.open();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: window focus event it's not triggered when going back to the parent window", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK:\r\n1.7.6 (only if using Lightweight child windows)\r\n1.8.2 - 2.0 - 2.1 master CI", "comment": { "comments": [ { "id": "194906", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Still not working correctly. Run the test case below\r\nOn app start - win1 focus (passed)\r\nSwitch to Tab2 - win1 blur, win2 focus (passed)\r\nSwitch to Tab1 - win2 blur, win1 focus (passed)\r\nPress button to open win3 - win1 blur, win3 focus (fail. blur not fired for win1)\r\nPress button to close win3 - win3 blur, win1 focus (pass)\r\nPress button to open win3 - win1 blur, win3 focus (fail. blur not fired for win1)\r\nSwitch to Tab2 - win3 blur, win2 focus (fail blur fired on win1)\r\nSwitch to Tab1 - win2 blur, win3 focus (fail focus fired on win1)\r\nPress button to close win3 - win3 blur, win1 focus (fail. Neither focus nor blur fired)\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n title:'open win3',\r\n width:200,\r\n height:100\r\n});\r\n\r\nwin1.add(button);\r\n \r\n\r\nwin1.addEventListener('focus', function(){\r\n Ti.API.info('win1 focused!')\r\n});\r\nwin1.addEventListener('blur', function(){\r\n Ti.API.info('win1 blurred!')\r\n}); \r\n\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n}); \r\n \r\nvar label2 = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'I am Window 2',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto'\r\n});\r\n \r\nwin2.add(label2);\r\n \r\nwin2.addEventListener('focus', function(){\r\n Ti.API.info('win2 focused!')\r\n});\r\nwin2.addEventListener('blur', function(){\r\n Ti.API.info('win2 blurred!')\r\n}); \r\n\r\nvar win3 = Ti.UI.createWindow({\r\n\ttitle:'foobar',\r\n\tbackgroundColor:'blue',\r\n});\r\nvar button2 = Ti.UI.createButton({\r\n\ttitle:'back to win1',\r\n\twidth:200,\r\n\theight:100,\r\n\tbackgroundColor:'white'\r\n});\r\n\r\nwin3.add(button2);\r\n\r\nwin3.addEventListener('focus', function(){\r\n Ti.API.info('win3 focused!')\r\n});\r\nwin3.addEventListener('blur', function(){\r\n Ti.API.info('win3 blurred!')\r\n}); \r\n\r\nbutton.addEventListener('click', function(){\r\n win3.open();\r\n});\r\n\r\nbutton2.addEventListener('click', function(){\r\n\twin3.close()\r\n});\r\n \r\n \r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n \r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n \r\n\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n \r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n \r\ntabGroup.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-15T14:57:49.000+0000", "updated": "2012-05-15T14:57:49.000+0000" }, { "id": "195211", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Complex Test Case:\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n \r\n \r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n \r\nwin1.addEventListener('focus', function(){\r\n Ti.API.info(\"win1 focused\");\r\n});\r\n\r\nwin1.addEventListener('blur', function(){\r\n Ti.API.info(\"win1 blur\");\r\n});\r\n \r\n \r\nvar button = Ti.UI.createButton({\r\n title:'open win3',\r\n width:200,\r\n height:100\r\n});\r\nbutton.addEventListener('click', function(){\r\n var win3 = Ti.UI.createWindow({\r\n title:'foobar',\r\n backgroundColor:'blue',\r\n //fullscreen:false\r\n });\r\n var button2 = Ti.UI.createButton({\r\n title:'back to win1',\r\n top: 100,\r\n width:200,\r\n height:100,\r\n backgroundColor:'white'\r\n });\r\n \r\n var button5 = Ti.UI.createButton({\r\n title:'open win5',\r\n width:200,\r\n height:100,\r\n backgroundColor:'white'\r\n });\r\n button5.addEventListener('click', function() {\r\n var win5 = Ti.UI.createWindow({\r\n title:'foobar',\r\n backgroundColor:'green',\r\n //fullscreen:false\r\n });\r\n var button6 = Ti.UI.createButton({\r\n title:'back to win3',\r\n width:200,\r\n height:100,\r\n backgroundColor:'white'\r\n });\r\n button6.addEventListener('click', function(){\r\n win5.close()\r\n });\r\n win5.add(button6);\r\n win5.addEventListener('blur', function() {\r\n Ti.API.info(\"win5 blurred\");\r\n });\r\n win5.addEventListener('focus', function() {\r\n Ti.API.info(\"win5 focus\");\r\n });\r\n win5.open();\r\n \r\n });\r\n button2.addEventListener('click', function(){\r\n win3.close()\r\n });\r\n win3.add(button2);\r\n win3.addEventListener('blur', function() {\r\n Ti.API.info(\"win3 blurred\");\r\n });\r\n win3.addEventListener('focus', function() {\r\n Ti.API.info(\"win3 focus\");\r\n });\r\n win3.add(button5);\r\n win3.open();\r\n});\r\n \r\nwin1.add(button);\r\n \r\n \r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nwin2.addEventListener('focus', function(){\r\n Ti.API.info(\"win2 focused\");\r\n});\r\n\r\nwin2.addEventListener('blur', function(){\r\n Ti.API.info(\"win2 blur\");\r\n});\r\n \r\nvar button10 = Ti.UI.createButton({\r\n title:'open win4',\r\n width:200,\r\n height:100\r\n});\r\nbutton10.addEventListener('click', function(){\r\n var win4 = Ti.UI.createWindow({\r\n title:'foobar',\r\n backgroundColor:'red',\r\n //fullscreen:false\r\n });\r\n var button12 = Ti.UI.createButton({\r\n title:'back to win2',\r\n width:200,\r\n height:100,\r\n backgroundColor:'white'\r\n });\r\n button12.addEventListener('click', function(){\r\n win4.close()\r\n });\r\n win4.add(button12);\r\n win4.addEventListener('blur', function() {\r\n Ti.API.info(\"win4 blurred\");\r\n });\r\n win4.addEventListener('focus', function() {\r\n Ti.API.info(\"win4 focus\");\r\n });\r\n \r\n win4.open();\r\n});\r\n\r\n \r\nwin2.add(button10);\r\n \r\n \r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n \r\ntabGroup.open();\r\n\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-17T14:55:09.000+0000", "updated": "2012-05-17T14:55:09.000+0000" }, { "id": "195557", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another test case: \r\n{code}\r\nvar win1 = Ti.UI.createWindow({fullscreen: false});\r\nvar button1 = Ti.UI.createButton();\r\nbutton1.addEventListener('click', function() {\r\n var win2 = Ti.UI.createWindow({fullscreen: false});\r\n win2.addEventListener('focus', function() {\r\n Ti.API.info(\"win2 focused\");\r\n });\r\n win2.addEventListener('blur', function() {\r\n Ti.API.info(\"win2 blur\");\r\n });\r\n win2.open();\r\n});\r\n\r\nwin1.add(button1);\r\nwin1.addEventListener('focus', function() {\r\n Ti.API.info(\"win1 focused\");\r\n});\r\nwin1.addEventListener('blur', function() {\r\n Ti.API.info(\"win1 blur\");\r\n});\r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-21T17:56:53.000+0000", "updated": "2012-05-21T17:56:53.000+0000" }, { "id": "195828", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "This is still happening to the customer ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-05-23T14:35:44.000+0000", "updated": "2012-05-23T14:35:44.000+0000" }, { "id": "195837", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Fixed, tested on latest CIBuild, provided testcase to the customer. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-05-23T15:13:36.000+0000", "updated": "2012-05-23T15:13:36.000+0000" }, { "id": "195842", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "QE team needs to add a test case so leave the fixed tickets in resolved state.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-23T15:25:40.000+0000", "updated": "2012-05-23T15:25:40.000+0000" }, { "id": "199034", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206172244\r\nTi Mobile SDK2.1.0.v20120618134156 hash r00905cd0\r\nOSX Lion 10.7.3\r\nNexus S OS 4.0.4\r\n\r\nThe expected behavior is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-18T18:42:18.000+0000", "updated": "2012-06-18T18:42:18.000+0000" }, { "id": "202619", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-11T02:57:01.000+0000", "updated": "2012-07-11T02:57:01.000+0000" }, { "id": "283494", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4967\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T06:16:24.000+0000", "updated": "2013-12-10T06:16:24.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }