{ "id": "143674", "key": "TIMOB-18476", "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": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-06-10T00:12:09.000+0000", "created": "2015-01-29T10:52:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios", "ipad", "popover" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-06-10T00:12:13.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": "When you open a Popover and then hide it you stop getting {{focus}} events on the Tabs and on the Tabs’ Windows. You still get {{focus}} events on the TabGroup itself.\r\n\r\nOpening a modal Window and closing it restores the situation to the normal behaviour.\r\n\r\nWith the attached code as {{app.js}} follow this steps to better understand the issue. Reproduced is also the modal’s restoring effect.\r\n\r\nh2. Steps\r\n\r\n# Click on the second tab\r\n# Click on the \"Open popover\"\r\n# Click on \"close\" (or click outside the popover)\r\n# Click on the first tab\r\n# Click on the \"Open modal\" button\r\n# Click on the \"close\" button\r\n# Click on the second tab\r\n\r\nh2. Expected result\r\n\r\n{code}\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Tab 1\r\n[ERROR] : Received focus for Window 1\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Tab 2\r\n[ERROR] : Received focus for Window 2\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Tab 1 # THIS LINE IS MISSING\r\n[ERROR] : Received focus for Window 1 # THIS LINE IS MISSING\r\n[ERROR] : Received focus for Modal\r\n[ERROR] : Received focus for Window 1\r\n[ERROR] : Received focus for Tab 1\r\n[ERROR] : Received close for Modal\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Window 2\r\n[ERROR] : Received focus for Tab 2\r\n{code}\r\n\r\nh2. Actual result\r\n\r\n{code}\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Tab 1\r\n[ERROR] : Received focus for Window 1\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Tab 2\r\n[ERROR] : Received focus for Window 2\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Modal\r\n[ERROR] : Received focus for Window 1\r\n[ERROR] : Received focus for Tab 1\r\n[ERROR] : Received close for Modal\r\n[ERROR] : Received focus for TabGroup\r\n[ERROR] : Received focus for Window 2\r\n[ERROR] : Received focus for Tab 2\r\n{code}\r\n\r\nh2. Attached code\r\n\r\n{code:javascript}\r\nvar tabGroup = Ti.UI.createTabGroup({ title: 'TabGroup' });\r\n\r\nvar window1 = Ti.UI.createWindow({ title: 'Window 1' });\r\nvar window2 = Ti.UI.createWindow({ title: 'Window 2' });\r\n\r\nvar tab1 = Ti.UI.createTab({ window: window1, title: 'Tab 1' });\r\nvar tab2 = Ti.UI.createTab({ window: window2, title: 'Tab 2' });\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\n// Modals\r\n\r\nvar modalButton = Ti.UI.createButton({ title: 'Open modal' });\r\n\r\nwindow1.add(modalButton);\r\n\r\nmodalButton.addEventListener('click', function () {\r\n\tvar close = Ti.UI.createButton({ title: 'close' });\r\n\r\n\tvar modal = Ti.UI.createWindow({ modal: true, title: 'Modal' });\r\n\r\n\tmodal.add(close);\r\n\r\n\tmodal.addEventListener('focus', onEvent);\r\n\tmodal.addEventListener('close', onEvent);\r\n\r\n\tclose.addEventListener('click', function () {\r\n\t\tmodal.close();\r\n\t});\r\n\r\n\tmodal.open();\r\n});\r\n\r\n// Popover\r\n\r\nvar popoverButton = Ti.UI.createButton({ title: 'Open popover' });\r\n\r\nwindow2.add(popoverButton);\r\n\r\npopoverButton.addEventListener('click', function () {\r\n\tvar close = Ti.UI.createButton({ title: 'close' });\r\n\r\n\tvar content = Ti.UI.createView({ title: 'Popover Content View' });\r\n\r\n\tcontent.backgroundColor = 'white';\r\n\tcontent.width = 200;\r\n\tcontent.height = 200;\r\n\tcontent.add(close);\r\n\r\n\tvar popover = Ti.UI.iPad.createPopover({ contentView: content });\r\n\r\n\tclose.addEventListener('click', function () {\r\n\t\tpopover.hide();\r\n\t});\r\n\r\n\tpopover.show({ view: popoverButton });\r\n});\r\n\r\n// Listeners\r\n\r\n[ tabGroup, window1, window2, tab1, tab2 ].forEach(function (view) {\r\n\tview.addEventListener('focus', onEvent);\r\n});\r\n\r\nfunction onEvent(event) {\r\n\tTi.API.error(\"Received \" + event.type + \" for \" + event.source.title);\r\n}\r\n\r\n// Open the tab group\r\n\r\ntabGroup.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: After a Popover hides, Apps stop getting focus events on Tabs’ windows", "creator": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 3.5, iOS", "closedSprints": [ { "id": 371, "state": "closed", "name": "2015 Sprint 08 SDK", "startDate": "2015-04-11T00:00:49.626Z", "endDate": "2015-04-24T12:00:00.000Z", "completeDate": "2015-04-28T15:02:06.073Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "344923", "author": { "name": "banzaimobile", "key": "banzaimobile", "displayName": "Banzai Mobile", "active": true, "timeZone": "Europe/Berlin" }, "body": "This bug effectively prevents use of popovers in our apps. \r\nWe had to remove popovers completely to update to 3.5.0\r\n\r\nI vote for high priority on this.", "updateAuthor": { "name": "banzaimobile", "key": "banzaimobile", "displayName": "Banzai Mobile", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-03T14:19:27.000+0000", "updated": "2015-03-03T14:19:27.000+0000" }, { "id": "349783", "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/6786", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-16T04:09:57.000+0000", "updated": "2015-04-16T04:09:57.000+0000" }, { "id": "350399", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "As a workaround, you can set the contentView property of the popover to be a Ti.UI.Window proxy. \r\nThen you will have consistent behavior on both iOS7 and iOS 8.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-22T16:14:52.000+0000", "updated": "2015-04-22T16:14:52.000+0000" }, { "id": "354482", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nWe now get focus events on tabs & windows after a popover hides.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.1.0.201505071004\r\nTi SDK : 4.1.0.v20150604094312\r\nCLI : 4.0.2-rc2\r\nAlloy : 1.6.0\r\nMAC Yosemite : 10.10.3\r\nAppc npm : 4.0.0\r\nAppc CLI : 4.0.1\r\nNode: v0.10.37\r\nIOS Simulator: Ipad Air IOS 8.3", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-05T23:54:49.000+0000", "updated": "2015-06-10T00:12:05.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }