{ "id": "130286", "key": "TIMOB-16957", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-07-02T16:49:01.000+0000", "created": "2014-05-12T15:52:17.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "module_popover", "qe-manualtest", "qe-testadded" ], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" } ], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-15T22:57:40.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": "example:\r\n{code:title=popover.javascript|borderStyle=solid}\r\n\r\nvar win = Ti.UI.createWindow();\r\nwin.addEventListener('focus', function(){\r\n Ti.API.log('focus');\r\n});\r\nwin.addEventListener('blur', function(){\r\n Ti.API.log('blur');\r\n});\r\n\r\nvar button = Ti.UI.createButton({title: 'Open Popover!'});\r\nbutton.addEventListener('click', function(e){\r\n popover.show({ view: button });\r\n});\r\nwin.add(button);\r\n\r\nvar view = Ti.UI.createView({backgroundColor: 'green'});\r\nview.add(Ti.UI.createLabel({text: \"It's not easy being green.\"}));\r\n\r\nvar rightButton = Ti.UI.createButton({title: 'Robin'});\r\nrightButton.addEventListener('click', function(e){\r\n alert(\"But green's the color of spring.\");\r\n});\r\n\r\nvar popover = Ti.UI.iPad.createPopover({\r\n width: 250,\r\n height: 100,\r\n contentView : Ti.UI.createWindow({}),\r\n});\r\npopover.add(view);\r\n\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS : Opening popover on iPad breaks focus/blur events of the current window", "creator": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "subtasks": [], "reporter": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "environment": "Titanium Studio, build: 3.2.3.201404181442\r\nTitanium SDK 3.2.3", "closedSprints": [ { "id": 133, "state": "closed", "name": "2014 Sprint 13 SDK", "startDate": "2014-06-23T21:55:20.791Z", "endDate": "2014-07-04T00:00:00.000Z", "completeDate": "2014-07-07T17:32:18.561Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "304756", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just to make sure that I understand this issue correctly, you are expecting only focus event once and no blur event on win object when popover is opened and closed. Let me know what is the output you are expecting in this case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-14T05:24:06.000+0000", "updated": "2014-05-14T05:24:06.000+0000" }, { "id": "304763", "author": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "body": "sure, i expect blur event from main window on open popover (wich ok at first) and focus event on popover hide (wich is not working)\r\nbut the main problem that after opening popover focus/blur event of the window doesn't work at all no mater what you do (switching tabs etc)", "updateAuthor": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2014-05-14T07:32:38.000+0000", "updated": "2014-05-14T07:32:38.000+0000" }, { "id": "304815", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~rian] Thanks for the clarification.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-14T18:13:04.000+0000", "updated": "2014-05-14T18:13:04.000+0000" }, { "id": "304816", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce the issue with the provided test case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-14T18:19:13.000+0000", "updated": "2014-05-14T18:19:13.000+0000" }, { "id": "311264", "author": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "body": "Is there any news on fixing it?", "updateAuthor": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2014-06-27T12:46:07.000+0000", "updated": "2014-06-27T12:46:07.000+0000" }, { "id": "311483", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as suggested.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-28T09:43:39.000+0000", "updated": "2014-06-28T09:43:39.000+0000" }, { "id": "311494", "author": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "body": "What do you mean \"Won't Fix\"? Why?", "updateAuthor": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2014-06-28T17:51:58.000+0000", "updated": "2014-06-28T17:51:58.000+0000" }, { "id": "311515", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I honestly don't know why I resolved this as \"Won't Fix.\" I may have resolved the wrong ticket. Reopening.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-29T09:29:20.000+0000", "updated": "2014-06-29T09:29:20.000+0000" }, { "id": "311946", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "h3. Note\r\nPopovers are not meant to be reused. Use this code, is a refactored code from the code in the description.\r\nh3. Test code\r\n{code}\r\nfunction popOver() {\r\n var contentView = Ti.UI.createWindow();\r\n var view = Ti.UI.createView({\r\n backgroundColor: 'green'\r\n });\r\n var label = Ti.UI.createLabel({text: \"It's not easy being green.\"})\r\n view.add(label);\r\n contentView.add(view);\r\n var rightButton = Ti.UI.createButton({\r\n title: 'Robin'\r\n });\r\n rightButton.addEventListener('click', function(e){\r\n alert(\"But green's the color of spring.\");\r\n });\r\n var popover = Ti.UI.iPad.createPopover({\r\n width: 250,\r\n height: 100,\r\n contentView : contentView\r\n });\r\n contentView.addEventListener('focus', function(){\r\n Ti.API.info('popover.window.focus');\r\n });\r\n contentView.addEventListener('blur', function(){\r\n Ti.API.info('popover.window.blur');\r\n });\r\n return popover;\r\n}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\nwin.addEventListener('focus', function(){\r\n Ti.API.log('base.window.focus');\r\n});\r\nwin.addEventListener('blur', function(){\r\n Ti.API.log('base.window.blur');\r\n});\r\n \r\nvar button = Ti.UI.createButton({\r\n title: 'Open Popover!'\r\n});\r\nbutton.addEventListener('click', function(e){\r\n popOver().show({ view: button });\r\n});\r\nwin.add(button); \r\nwin.open();\r\n{code}\r\nh3. PR:\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/5877\r\n3.3.x: https://github.com/appcelerator/titanium_mobile/pull/5878", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-07-01T22:43:30.000+0000", "updated": "2014-07-01T22:49:36.000+0000" }, { "id": "312096", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed on:\r\nMac OSX 10.9.4\r\nAppcelerator Studio, build: 3.3.0.201406271159\r\nTitanium SDK, build: 3.3.0.v20140702094913\r\nTitanium CLI, build: 3.3.0-rc4\r\nAlloy: 1.4.0-rc3\r\nXcode: 5.1.1\r\niOS Device: iPad Air (7.1.2)\r\niOS Simulator: iPad (7.1)\r\n\r\nUsed test code provided by [~penrique].\r\nFocus and blur events of the popover window and base window successfully called multiple times.\r\n{code}\r\n[INFO] : base.window.focus\r\n[INFO] : base.window.blur\r\n[INFO] : popover.window.focus\r\n[INFO] : popover.window.blur\r\n[INFO] : base.window.focus\r\n{code}\r\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-02T18:09:32.000+0000", "updated": "2014-07-02T18:09:32.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }