{ "id": "70670", "key": "TIMOB-4345", "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": "11364", "description": "Mobile 1.8.0 M11", "name": "Sprint 2011-32", "archived": true, "released": true, "releaseDate": "2011-08-15" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-11-05T14:44:24.000+0000", "created": "2011-06-07T13:19:43.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-11-05T14:44:24.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": "The focus and blur events are not fired on a window that is opened using the url property.\r\nIf you remove the url property they work fine. In app.js, if you comment out the url property, and uncomment openButton then focus and blur will work.\r\n\r\nStep 1: Run the code below\r\nStep 2: Notice that focus and blur do not show in your console as you open click open and close.\r\nStep 3: In app.js, comment out the url property, and uncomment openButton.\r\nStep 4: Run the app again.\r\nStep 5: Notice that focus and blur events show up in your console, when you click open and close.\r\n\r\n{code:title=\"app.js\"}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n\tbackgroundColor: 'blue',\r\n\turl: 'win1.js'\r\n});\r\nwin1.addEventListener('blur', function(e){\r\n\tTi.API.info('blur');\r\n});\r\nwin1.addEventListener('focus', function(e){\r\n\tTi.API.info('focus');\r\n});\r\n// var openButton = Ti.UI.createButton({\r\n// \ttitle:'open',\r\n// \theight: 50,\r\n// \twidth: 200\r\n// });\r\n// win1.add(openButton);\r\n// \r\n// openButton.addEventListener('click', function(e){\r\n// \tTi.App.fireEvent('openwin2');\r\n// });\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n\twindow: win1\r\n});\r\ntabGroup.addTab(tab1);\r\ntabGroup.open();\r\n\r\nTi.App.addEventListener('openwin2', function(e){\r\n\t\tvar win2 = Ti.UI.createWindow({\r\n\t\t\tbackgroundColor: 'red'\r\n\t\t});\r\n\t\tvar closeButton = Ti.UI.createButton({\r\n\t\t\ttitle: 'close',\r\n\t\t\theight: 50,\r\n\t\t\twidth: 200\r\n\t\t});\r\n\t\tcloseButton.addEventListener('click', function(e){\r\n\t\t\twin2.close();\r\n\t\t})\r\n\t\twin2.add(closeButton);\r\n\t\ttab1.open(win2);\r\n});\r\n{code}\r\n\r\n{code:title=\"win1.js\"}\r\nvar win1 = Ti.UI.currentWindow;\r\n\r\nwin1.addEventListener('blur', function(e){\r\n\tTi.API.info('blur');\r\n});\r\nwin1.addEventListener('focus', function(e){\r\n\tTi.API.info('focus');\r\n});\r\nvar openButton = Ti.UI.createButton({\r\n\ttitle:'open',\r\n\theight: 50,\r\n\twidth: 200\r\n});\r\nwin1.add(openButton);\r\n\r\nopenButton.addEventListener('click', function(e){\r\n\tTi.App.fireEvent('openwin2');\r\n});\r\n{code}\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-141651", "attachment": [], "flagged": false, "summary": "Android: focus and blur events don't fire on window with url ", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.7.0.RC1\r\nAndroid Emulator 2.1", "comment": { "comments": [ { "id": "162426", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Pull request ready\r\nhttps://github.com/appcelerator/titanium_mobile/pull/357", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-08-10T09:03:45.000+0000", "updated": "2011-08-10T09:03:45.000+0000" }, { "id": "164339", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Review and merge.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-29T10:30:45.000+0000", "updated": "2011-08-29T10:30:45.000+0000" }, { "id": "165422", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing. Passed as expected on HTC Hero 2.1update1, Nexus S 2.3.4, LG-V909 (GSlate) 3.1.\n\nSDK:\nversion=1.8.0\ntimestamp=09/06/11 15:53\ngithash=bc5c585...\n", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-08T15:09:24.000+0000", "updated": "2011-09-08T15:09:24.000+0000" }, { "id": "171653", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Standardizing summary and labels.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-05T14:44:01.000+0000", "updated": "2011-11-05T14:44:01.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }