{ "id": "172721", "key": "TIMOB-26641", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-12-19T12:36:44.000+0000", "created": "2018-12-10T14:44:45.000+0000", "epic": { "id": 172753, "key": "TIMOB-26658", "name": "Customer_Escalations", "summary": "Placeholder epics to track customer escalations", "color": { "key": "color_5" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [ "run-on-main-thread" ], "versions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-12-19T17:17: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": "h6.Step to reproduce issue: \r\n1. Create a classic mobile app project. \r\n2. Replace app.js code with the provided sample code. \r\n3. Make sure set “run-on-main-thread” property to “true” as default \r\n4. Run on iOS device. \r\n\r\nh6.Actual behaviour: \r\nOn click of “Open Yellow Window and Close Blue Window” button, “Yellow Window” is getting opened and closed immediately , if we set “run-on-main-thread” property to “true”. \r\n\r\nh6.Expected behaviour: \r\nOn click of “Open Yellow Window and Close Blue Window” button, it should open “Yellow Window” and close the “Blue Window”. \r\n\r\nh6.NOTE: \r\nIf we set “run-on-main-thread” property to “false”, then it is working as expected. ", "attachment": [ { "id": "65960", "filename": "app.js", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2018-12-10T14:44:23.000+0000", "size": 852, "mimeType": "text/javascript" }, { "id": "65973", "filename": "updated_app.js", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2018-12-13T06:40:50.000+0000", "size": 1859, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: On main thread openWindow and closeWindow in sequence from NavigationWindow is not working properly", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "SDK 7.5.0\r\niOS 11 and 12", "closedSprints": [ { "id": 1104, "state": "closed", "name": "2018 Sprint 26", "startDate": "2018-12-17T15:56:00.172Z", "endDate": "2018-12-21T15:56:00.000Z", "completeDate": "2018-12-26T17:42:17.145Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "444453", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A quick workaround for this issue is first call closeWindow then call openWindow. \r\n\r\nUpdated app.js which will work- \r\n{code:java}\r\nfunction getNavWindow(){\r\nvar win2 = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n title: 'Red Window'\r\n});\r\n\r\nvar win1 = Ti.UI.iOS.createNavigationWindow({\r\n window: win2\r\n});\r\n\r\nvar win3 = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n title: 'Blue Window'\r\n});\r\n\r\nvar win4 = Ti.UI.createWindow({\r\n backgroundColor: 'yellow',\r\n title: 'Yellow Window'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n title: 'Open Blue Window'\r\n});\r\nbutton.addEventListener('click', function(){\r\n win1.openWindow(win3, {animated:true});\r\n});\r\n\r\nwin2.add(button);\r\nvar button2 = Ti.UI.createButton({\r\n color : 'white',\r\n title: 'Open Yellow Window and Close Blue Window'\r\n});\r\nbutton2.addEventListener('click', function(){\r\n win1.closeWindow(win3, {animated:false});\r\n win1.openWindow(win4, {animated:true});\r\n});\r\n\r\nwin3.add(button2);\r\nreturn win1;\r\n}\r\ngetNavWindow().open();\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-11T08:05:06.000+0000", "updated": "2018-12-11T08:05:06.000+0000" }, { "id": "444455", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We will look in this to fix properly.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-11T08:11:11.000+0000", "updated": "2018-12-11T08:11:11.000+0000" }, { "id": "444567", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR - https://github.com/appcelerator/titanium_mobile/pull/10535\r\n\r\nTest Case -\r\n\r\n{code:java}\r\nfunction getNavWindow(){\r\nvar win2 = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n title: 'Red Window'\r\n});\r\n\r\nvar win1 = Ti.UI.iOS.createNavigationWindow({\r\n window: win2\r\n});\r\n\r\nvar win3 = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n title: 'Blue Window'\r\n});\r\n\r\nvar win4 = Ti.UI.createWindow({\r\n backgroundColor: 'yellow',\r\n title: 'Yellow Window'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n title: 'Open Blue Window'\r\n});\r\nbutton.addEventListener('click', function(){\r\n win1.openWindow(win3, {animated:true});\r\n});\r\n\r\nwin2.add(button);\r\nvar button2 = Ti.UI.createButton({\r\n color : 'white',\r\n title: 'Open Yellow Window and Close Blue Window'\r\n});\r\nbutton2.addEventListener('click', function(){\r\n win1.openWindow(win4, {animated:true});\r\n win1.closeWindow(win3, {animated:false});\r\n});\r\n\r\nwin3.add(button2);\r\nreturn win1;\r\n}\r\ngetNavWindow().open();\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-13T04:43:04.000+0000", "updated": "2018-12-13T04:43:04.000+0000" }, { "id": "444571", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Customer's specific scenario is more complex then example code, where they need to close multiple previously opened windows on open of new window, So provide a new test code in updated_app.js. Hopefully the PR can cover this fix. ", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2018-12-13T06:43:09.000+0000", "updated": "2018-12-13T06:43:09.000+0000" }, { "id": "444620", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~vijaysingh], With the {{updated_app.js}} I see that when I click {{Open Yellow Window and Close Blue Window}} I see the {{middle window}} open & then the {{yellow window}} IS this expected ?", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-15T00:01:47.000+0000", "updated": "2018-12-15T00:01:47.000+0000" }, { "id": "444636", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~lchoudhary] This PR doesn't completely fix the issue. I am still working on this. Thanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-17T04:22:22.000+0000", "updated": "2018-12-17T04:22:22.000+0000" }, { "id": "444638", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~lchoudhary] PR updated.\r\nWith the updated_app.js when you click \"Open Yellow Window and Close Blue Window\", middle window will open & then the yellow window (Reason is first blue window is closed with default animation (true), then yellow window is open with animation true). After you go back, it will show Middle Window. Go back again, it will show Red Window.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-17T07:00:51.000+0000", "updated": "2018-12-17T07:00:51.000+0000" }, { "id": "444711", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for merge to be enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T19:43:25.000+0000", "updated": "2018-12-18T19:43:25.000+0000" }, { "id": "444746", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 8.0.0.v20181219075358 .\r\n{code}\r\nTest Environment:\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n Memory = 17179869184\r\nNode.js\r\n Node.js Version = 8.12.0\r\n npm Version = 6.4.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.0.0.v20181219075358\r\nDevice =iPhone 6s iOS 12\r\nSimulator =iphone 7 iOS 11\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-19T17:16:59.000+0000", "updated": "2018-12-19T17:16:59.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }