{ "id": "126996", "key": "TIMOB-16560", "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": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2016-10-19T14:15:55.000+0000", "created": "2014-03-01T03:08:54.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "3.2.1", "blur", "bug", "events", "focus", "ios", "iphone", "navigationWindow" ], "versions": [ { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [ { "id": "53150", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "121481", "key": "TIMOB-15768", "fields": { "summary": "Window focus event not firing after animating containing TabGroup", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "53149", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "124169", "key": "TIMOB-16104", "fields": { "summary": "iOS: NavigationWindow does not fire \"focus\" and \"blur\" events for child windows after being animated", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T17:53:26.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": "After my app refactoring to use navigationWindow instead navGroup, all the focus/blur events on the windows inside the navigationWindow stopped to fire up, after doing alot tests, i think i found what is causing the problem...\r\n\r\non my app theres 2 active window on the screen one window is the sideMenu thats stays behind and the other is the navigationWindow, with this setup the events dosent fireup like i described, but when i remove the sideMenu window all the events starts to fire up as usual\r\n\r\nso when theres 2 top level windows(window, navigationWindow) on the screen the views inside navigationWindow dosent got focus/blur events fired up, on the moment theres only one window, all backs to normal\r\n\r\n{code}\r\nvar height = Ti.Platform.displayCaps.platformHeight;\r\nvar width = Ti.Platform.displayCaps.platformWidth;\r\nvar isToggled = false;\r\n\r\nvar win = Ti.UI.createWindow({ width : width, height : height, backgroundColor : \"pink\" });\r\n\r\nvar nextWin = Ti.UI.createWindow({ width : width, height : height, backgroundColor : \"blue\" });\r\n\r\nvar buttonNext = Ti.UI.createButton({ title : \"next window\" });\r\n\r\nvar buttonMenu = Ti.UI.createButton({ title : \"MENU\", top : 60, left : 10 });\r\n\r\nwin.add(buttonMenu);\r\nwin.add(buttonNext);\r\n\r\nvar navigation = Titanium.UI.iOS.createNavigationWindow({ backgroundColor : 'grey', window : win, width : width, height : height, });\r\n\r\nwin.addEventListener('focus', function() { Ti.API.log(\"win focus\"); });\r\n\r\nnextWin.addEventListener('focus', function() { Ti.API.log(\"next win focus\"); });\r\n\r\nbuttonNext.addEventListener('click', function() { navigation.openWindow(nextWin); });\r\n\r\nbuttonMenu.addEventListener('click', function() { toggleMenu(); });\r\n\r\nvar animateLeft = Ti.UI.createAnimation({ left : 180, curve : Ti.UI.ANIMATION_CURVE_EASE_OUT, duration : 500 });\r\nvar animateRight = Ti.UI.createAnimation({ left : 0, curve : Ti.UI.ANIMATION_CURVE_EASE_OUT, duration : 500 });\r\n\r\nvar toggleMenu = function() {\r\nif (!isToggled) { navigation.animate(animateLeft); isToggled = true; } else { navigation.animate(animateRight); isToggled = false; }\r\n};\r\n\r\nnavigation.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Window focus/blur events do not fire after animating the navigation window", "creator": { "name": "felipemathies", "key": "felipemathies", "displayName": "Felipe Mathies", "active": true, "timeZone": "America/Sao_Paulo" }, "subtasks": [], "reporter": { "name": "felipemathies", "key": "felipemathies", "displayName": "Felipe Mathies", "active": true, "timeZone": "America/Sao_Paulo" }, "environment": "iOS sdk 7.0.3\r\ntitanium sdk 3.2.1 GA\r\niphone", "comment": { "comments": [ { "id": "295328", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you please attach a simple runnable test case so that we can take a look and try to reproduce the issue in-house.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-03T21:00:04.000+0000", "updated": "2014-03-03T21:00:04.000+0000" }, { "id": "295827", "author": { "name": "felipemathies", "key": "felipemathies", "displayName": "Felipe Mathies", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "yes sure, after isolating the problem i discovery that the problem is with the animation, on me moment when you apply an animation to the navigationWindow the events focus/blur stop firing, so heres the example:\r\n\r\nInstructions \r\n\r\nFirst click on \"next window\" button and the events focus from the next window fires up just fine, go back, and press \"MENU\" twice to move the window right/left, and after that if you go \"next window\" again the focus event dosent fire up anymore...\r\n\r\n{code} \r\n\r\nvar height = Ti.Platform.displayCaps.platformHeight;\r\n \tvar width = Ti.Platform.displayCaps.platformWidth;\r\n \tvar isToggled = false;\r\n \t\t\t\r\n\t\tvar win = Ti.UI.createWindow({\r\n\t\t\twidth : width,\r\n\t\t\theight : height,\r\n\t\t\tbackgroundColor : \"pink\"\r\n\t\t});\r\n\r\n\t\tvar nextWin = Ti.UI.createWindow({\r\n\t\t\twidth : width,\r\n\t\t\theight : height,\r\n\t\t\tbackgroundColor : \"blue\"\r\n\t\t});\r\n\r\n\t\tvar buttonNext = Ti.UI.createButton({\r\n\t\t\ttitle : \"next window\"\r\n\t\t});\r\n\t\t\r\n\t\tvar buttonMenu = Ti.UI.createButton({\r\n\t\t\ttitle : \"MENU\",\r\n\t\t\ttop : 60,\r\n\t\t\tleft : 10\r\n\t\t});\r\n\r\n\t\twin.add(buttonMenu);\r\n\t\twin.add(buttonNext);\r\n\r\n\t\tvar navigation = Titanium.UI.iOS.createNavigationWindow({\r\n\t\t\tbackgroundColor : 'grey',\r\n\t\t\twindow : win,\r\n\t\t\twidth : width,\r\n\t\t\theight : height,\r\n\t\t});\r\n\t\t\r\n\t\twin.addEventListener('focus', function() {\r\n\t\t\tTi.API.log(\"win focus\");\r\n\t\t});\r\n\r\n\t\tnextWin.addEventListener('focus', function() {\r\n\t\t\tTi.API.log(\"next win focus\");\r\n\t\t});\r\n\r\n\t\tbuttonNext.addEventListener('click', function() {\r\n\t\t\tnavigation.openWindow(nextWin);\r\n\t\t}); \r\n\t\t\r\n\t\tbuttonMenu.addEventListener('click', function() {\r\n\t\t\ttoggleMenu();\r\n\t\t}); \r\n\t\t\r\n\t\tvar animateLeft = Ti.UI.createAnimation({\r\n\t\t\tleft : 180,\r\n\t\t\tcurve : Ti.UI.ANIMATION_CURVE_EASE_OUT,\r\n\t\t\tduration : 500\r\n\t\t});\r\n\t\tvar animateRight = Ti.UI.createAnimation({\r\n\t\t\tleft : 0,\r\n\t\t\tcurve : Ti.UI.ANIMATION_CURVE_EASE_OUT,\r\n\t\t\tduration : 500\r\n\t\t});\r\n\t\t\r\n\t\tvar toggleMenu = function() {\r\n\t\t\tif (!isToggled) {\r\n\t\t\t\tnavigation.animate(animateLeft);\r\n\t\t\t\tisToggled = true;\r\n\t\t\t} else {\r\n\t\t\t\tnavigation.animate(animateRight);\r\n\t\t\t\tisToggled = false;\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n \t\tnavigation.open();\r\n{code}", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-05T22:57:51.000+0000", "updated": "2014-08-14T05:15:28.000+0000" }, { "id": "295894", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with 3.2.1 release.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-06T06:03:10.000+0000", "updated": "2014-03-06T06:03:10.000+0000" }, { "id": "299474", "author": { "name": "narbs", "key": "narbs", "displayName": "Christian Clare", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Having the identical issue with 3.2.2.GA release - reproduced with example above and also with my own code. Focus events no longer fire after navigation window is animated.\r\n\r\nAffects me the same way - have a sliding top window and menu underneath. Moving the navigation window causing app to fail after focus events don't fire.\r\n\r\nTested with iOS 7.1", "updateAuthor": { "name": "narbs", "key": "narbs", "displayName": "Christian Clare", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2014-04-01T10:00:43.000+0000", "updated": "2014-04-01T10:01:39.000+0000" }, { "id": "313805", "author": { "name": "jeffbonnes", "key": "jeffbonnes", "displayName": "Jeff Bonnes", "active": true, "timeZone": "Australia/Sydney" }, "body": "Also happens with TabGroups. After you animate a TabGroup, if you open in window in the active Tab [activeTab.openWindow(newWindow);] the focus event on the newWindow never fires.\r\n\r\nTested with 3.3.0RC2 and iOS7.1 Simulator. Let me know if you need a simple runnable test case.", "updateAuthor": { "name": "jeffbonnes", "key": "jeffbonnes", "displayName": "Jeff Bonnes", "active": true, "timeZone": "Australia/Sydney" }, "created": "2014-07-14T07:06:10.000+0000", "updated": "2014-07-14T07:06:10.000+0000" }, { "id": "318606", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \r\nTitanium Command-Line Interface, \r\nCLI version 3.3.0, \r\nTitanium SDK version 3.3.0.GA \r\niOS SDK: 7.1 \r\niOS iPhone Simulator: 7.1", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-14T05:19:23.000+0000", "updated": "2014-08-14T12:29:14.000+0000" }, { "id": "389966", "author": { "name": "mkaffel", "key": "mkaffel", "displayName": "Kaffel Mehdi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \r\nAppcelerator Studio version 4.6.0, \r\nTitanium SDK version 5.2.3.GA\r\niOS SDK: 9.3\r\niOS iPhone Simulator: 9.3\r\n\r\nThis bug will be fixed one day ?", "updateAuthor": { "name": "mkaffel", "key": "mkaffel", "displayName": "Kaffel Mehdi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-06T13:01:41.000+0000", "updated": "2016-07-06T13:01:41.000+0000" }, { "id": "392296", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, here is the thing: When you are animating a window (manually), it never loses the technical focus, because it is just moved on the x-axis like in this case. It may become invisible to the currently visible area of the user, but it never loses focus to another window / top-level-container. The exactly same would happen to a native {{UINavigationController}} if you animate it like this. \r\n\r\nI actually came across this \"issue\" a few years ago and I fixed it quite quickly by using callbacks that listen to the animations and click-events of the toggle-button. If someone needs the above example demonstrated with clean callbacks, let me know. But I would highly suggest to close this issue afterwards, since it's a matter of programming-style to get the proper trigger when needing them. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-03T14:33:08.000+0000", "updated": "2016-08-03T14:33:08.000+0000" }, { "id": "399367", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Since we didn't receive any feedback regarding this, I think the stated reasons make sense here. Resolving ticket for now, thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-19T14:15:55.000+0000", "updated": "2016-10-19T14:15:55.000+0000" }, { "id": "416215", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\", with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T17:53:26.000+0000", "updated": "2017-03-29T17:53:26.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }