{ "id": "147091", "key": "AC-92", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-11-11T02:46:24.000+0000", "created": "2015-04-20T10:55:11.000+0000", "labels": [ "Window", "bug", "eventlistener", "fires", "focus", "problem" ], "versions": [], "issuelinks": [], "assignee": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2015-11-11T02:46:24.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "My application was running good with titanium sdk 3.4.0, but after updating the titanium SDK 3.5.1 and Titanium SDK 4.0 Beta, both version I am facing the same problem. \r\n\r\nFocus event some time fire for the window and some time it doesn't, I has created the application with JS pattern using Ti.UI.current window object and that application is created 1.5 years before, I always make the app compatible to the newer sdk which gets launch up.\r\n\r\nBut with current sdk app is completely get disturbed and has lots of bugs, only because of the problem that window Focus event doesn't fire properly, due to this window get hangs up.\r\n\r\nI have created the sample application which can exactly reproduce this issue.\r\n\r\nRequest for the appcelerator team to take this issue very seriously.\r\n\r\nStep To reproduce the issue:\r\n\r\nRun the application on iOS\r\n\r\n1. Click on Open Blue Window.\r\n2.Alert dialog will appear, click on Confirm.\r\n3. Second window In blue color will get open.\r\n4. On second window on top right navigation bar click on \"Open third window\"\r\n5. On 3 window with pink color will get open, click on \"Close pink window\"\r\n\r\nNow when you go back to second window, second window focus will not fire, and then you navigate to first window, first window focus will not fire.\r\n\r\nEven the application will get hang, all the buttons will stop working and even next window doesn't get opens up on click of \"open click window.", "attachment": [ { "id": "55250", "filename": "DemoNavigationApp.zip", "author": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-06T07:38:15.000+0000", "size": 19290, "mimeType": "application/zip" } ], "flagged": false, "summary": "Window Focus event Fire some times fire and some times it doesn't. Even app get hangs up and next window is not opening.", "creator": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Sdk 3.5.1 & Beta 4.0 with iOS", "comment": { "comments": [ { "id": "350646", "author": { "name": "pchowdhury", "key": "pchowdhury", "displayName": "Papia Chowdhury", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello\r\n\r\nCould you please provide us test case regarding this issue?\r\n\r\n\r\nThanks", "updateAuthor": { "name": "pchowdhury", "key": "pchowdhury", "displayName": "Papia Chowdhury", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-24T08:38:25.000+0000", "updated": "2015-04-24T08:38:25.000+0000" }, { "id": "350855", "author": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-27T10:54:10.000+0000", "updated": "2015-04-27T10:55:00.000+0000" }, { "id": "351763", "author": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Step To reproduce the issue:\r\n1. Click on Open Blue Window.\r\n2.Alert dialog will appear, click on Confirm.\r\n3. Second window In blue color will get open.\r\n4. On second window on top right navigation bar click on \"Open third window\"\r\n5. On 3 window with pink color will get open, click on \"Close pink window\"\r\n\r\nNow when you go back to second window, second window focus will not fire, and then you navigate to first window, first window focus will not fire.\r\n\r\nEven the application will get hang, all the buttons will stop working and even next window doesn't get opens up on click of \"open click window.\r\n", "updateAuthor": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-06T08:07:13.000+0000", "updated": "2015-05-06T08:07:13.000+0000" }, { "id": "352155", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~moizchhatriwala], the use of \"url\" property for Ti.UI.window has been deprecated, please create a new test case that replicates this issue without the url property\r\n\r\nThanks", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-05-11T15:42:19.000+0000", "updated": "2015-05-11T15:42:19.000+0000" }, { "id": "352254", "author": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Actually the application in which we are facing problem, they are created long time before, if the API is deprecated so it doesn't mean that testing will not be done while upgrading the titanium SDK version. Rather than that if users are reporting the bug then efforts should be made to solve the major issue. \r\n\r\nIts The titanium appcelerator responsibility to resolve the issues which user are facing due to launch of new SDK version.\r\n\r\nSecondly to make the platform reliable and trustable for the customer this excuse should not be given, rather than efforts should be made in resolving the issues which are reported by the user. No platform can become best if they do not here about the users of that platform.\r\n\r\nLast point, its titanium responsibility to test the same bug using common.js pattern of code, to insure the Quality Assurance of the titanium product.\r\n\r\nHope from your end that bug will be solved soon from your end.\r\n\r\nRegards,\r\nMoiz", "updateAuthor": { "name": "moizchhatriwala", "key": "moizchhatriwala", "displayName": "MoizChhatriwala", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-12T09:50:11.000+0000", "updated": "2015-05-12T09:50:11.000+0000" }, { "id": "352272", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~moizchhatriwala] Of course we are responsible to fix bugs in the platform, mobile is a dynamic world and as Apple or Android, with every new release there are new API's and some deprecated API's, our responsibility is to let our users know through the docs, and the responsibility of the developers is to maintain their code, and adapt it with new releases, this is the same in all the platforms and also in all the frameworks, if an API has been deprecated it's going to stop to work and you as developer need to modify your code and adapt it to the new API's.\r\nSo, if you can create a test case with non deprecated API's that can replicate this issue I would be happy to escalate this to our engineering team for a fix.\r\n\r\nBest ", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-05-12T14:52:41.000+0000", "updated": "2015-05-12T14:52:41.000+0000" }, { "id": "364348", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~moizchhatriwala], Using CommonJS Method, I have tested the below project. Its working as expected. Window focus event is working. As URL property is deprecated in Ti.UI.window, i modified your demo project in CommonJS method. Please follow this coding pattern for future development.\r\n\r\nh5. app.js\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n\tbackgroundColor : 'red',\r\n\ttitle : 'Red Window',\r\n});\r\n\r\nvar nav = require('nav').create(win1);\r\n\r\nvar button = Titanium.UI.createButton({\r\n\ttitle : 'Open Blue Window'\r\n});\r\n\r\nbutton.addEventListener('click', function() {\r\n\tdialog.show();\r\n});\r\n\r\nvar dialog = Ti.UI.createAlertDialog({\r\n\tcancel : 1,\r\n\tbuttonNames : ['Confirm', 'Cancel'],\r\n\tmessage : 'Would you like to open window 2?',\r\n\ttitle : 'Window Option'\r\n});\r\ndialog.addEventListener('click', function(e) {\r\n\tif (e.index == 0) {\r\n\r\n\t\tvar WindowTwo = require('WindowTwo');\r\n\t\tvar myWindowTwo = new WindowTwo();\r\n\r\n\t\tnav.openWindow(myWindowTwo, {\r\n\t\t\tanimated : true\r\n\t\t});\r\n\t}\r\n\r\n});\r\n\r\nwin1.add(button);\r\n\r\nvar button1 = Titanium.UI.createButton({\r\n\ttitle : 'Open Forth window',\r\n});\r\n\r\nbutton1.addEventListener('click', function() {\r\n\tvar WindowFour = require('WindowFour');\r\n\tvar myWindowFour = new WindowFour();\r\n\tnav.openWindow(myWindowFour, {\r\n\t\tanimated : true\r\n\t});\r\n});\r\n\r\nwin1.leftNavButton = button1;\r\nwin1.addEventListener(\"focus\", function(e) {\r\n\r\n\tTi.API.info(\"Focus On First Window\");\r\n});\r\n\r\nnav.open(); \r\n{code}\r\n\r\nh5. WindowTwo.js\r\n\r\n{code}\r\nvar WindowTwo = function() {\r\n\t\r\n\tvar nav = require('nav').getNav();\r\n\t\r\n\tvar win2 = Titanium.UI.createWindow({\r\n\t\tbackgroundColor : 'blue',\r\n\t\ttitle : 'Blue Window',\r\n\t\t\r\n\t});\r\n\r\n\tvar button1 = Titanium.UI.createButton({\r\n\t\ttitle : 'Open Third Window',\r\n\t\ttop : 20,\r\n\t\theight : 30\r\n\t});\r\n\r\n\tbutton1.addEventListener('click', function() {\r\n\t\tvar WindowThree = require('WindowThree');\r\n \tvar myWindowThree = new WindowThree();\r\n\t\tnav.openWindow(myWindowThree, {\r\n\t\t\tanimated : true\r\n\t\t});\r\n\t});\r\n\r\n\twin2.rightNavButton = button1;\r\n\r\n\tvar button = Titanium.UI.createButton({\r\n\t\ttitle : 'Close Blue Window',\r\n\t});\r\n\t\r\n\tbutton.addEventListener('click', function() {\r\n\t\talert(\"closing window 2\");\r\n\t\tnav.closeWindow(win2);\r\n\t});\r\n\r\n\twin2.add(button);\r\n\r\n\twin2.addEventListener(\"focus\", function(e) {\r\n\t\tTi.API.info(\"Focus On Second Window\");\r\n\t});\r\n\r\n\treturn win2;\r\n\r\n};\r\n\r\nmodule.exports = WindowTwo; \r\n{code}\r\n\r\nh5. WindowThree.js\r\n\r\n{code}\r\nvar WindowThree = function(navWin) {\r\n\tvar nav = require('nav').getNav();\r\n\t\r\n\tvar win3 = Titanium.UI.createWindow({\r\n\t\tbackgroundColor : 'gray',\r\n\t\ttitle : 'Gray Window',\r\n\t\t\r\n\t});\r\n\t\r\n\tvar button1 = Titanium.UI.createButton({\r\n\t\ttitle : 'Open Forth Window',\r\n\t});\r\n\r\n\tbutton1.addEventListener('click', function() {\r\n\t\tvar WindowFour = require('WindowFour');\r\n \tvar myWindowFour = new WindowFour();\r\n\t\tnav.openWindow(myWindowFour, {\r\n\t\t\tanimated : true\r\n\t\t});\r\n\t});\r\n\t\r\n\twin3.rightNavButton = button1;\r\n\r\n\tvar button = Titanium.UI.createButton({\r\n\t\ttitle : 'Close Gray Window'\r\n\t});\r\n\t\r\n\tbutton.addEventListener('click', function() {\r\n\t\talert(\"closing window 3\");\r\n\t\tnav.closeWindow(win3);\r\n\t});\r\n\r\n\twin3.add(button);\r\n\r\n\twin3.addEventListener(\"focus\", function(e) {\r\n\t\tTi.API.info(\"Focus On Third Window\");\r\n\t});\r\n\r\n\treturn win3;\r\n\r\n};\r\n\r\nmodule.exports = WindowThree; \r\n{code}\r\n\r\nh5. WindowFour.js\r\n\r\n{code}\r\nvar WindowFour = function(navWin) {\r\n\tvar nav = require('nav').getNav();\r\n\t\r\n\tvar win4 = Titanium.UI.createWindow({\r\n\t\tbackgroundColor : 'pink',\r\n\t\ttitle : 'Pink Window',\r\n\t\t\r\n\t});\r\n\r\n\tvar button = Titanium.UI.createButton({\r\n\t\ttitle : 'Close Pink Window'\r\n\t});\r\n\tbutton.addEventListener('click', function() {\r\n\t\talert(\"closing window 4\");\r\n\t\tnav.closeWindow(win4);\r\n\t});\r\n\r\n\twin4.add(button);\r\n\r\n\twin4.addEventListener(\"focus\", function(e) {\r\n\t\tTi.API.info(\"Focus On Forth Window\");\r\n\t});\r\n\r\n\treturn win4;\r\n\r\n};\r\n\r\nmodule.exports = WindowFour; \r\n{code}\r\n\r\nh5. nav.js\r\n\r\n{code}\r\nvar nav;\r\n \r\nfunction create(win1) {\r\n nav = Ti.UI.iOS.createNavigationWindow({\r\n window: win1\r\n });\r\n return nav;\r\n}\r\nfunction getNav() {\r\n return nav;\r\n}\r\n \r\nexports.create = create;\r\nexports.getNav = getNav;\r\n\r\n{code}\r\n\r\n Hope this helps, Thanks.", "updateAuthor": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-09-19T11:56:44.000+0000", "updated": "2015-09-19T11:56:44.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }