{ "id": "130882", "key": "TIMOB-17027", "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": "2014-06-06T17:26:36.000+0000", "created": "2014-05-26T09:39:45.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.3.0", "regression" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "38093", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "86976", "key": "TIMOB-7808", "fields": { "summary": "Android: Webview reloads when removed and re-added. Regression from 1.7.5", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "49719", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "152909", "key": "TIMOB-19922", "fields": { "summary": "iOS: Child WebView is not loaded when re-added back to the parent window", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T23:04:18.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": "The webview reloads when re-added to a window after being removed.\r\n\r\nThis is a regression as the issue does not occur on 3.2.3. Also the issue does not occur on Android.\r\n\r\nSteps to Reproduce:\r\n1. Run the application \r\n2. Click on the \"remove and add webview\" button \r\n3. Click on the \"remove and release and add webview\" button\r\n\r\nActual Result:\r\nThe webview gets loaded at all the three steps. The alert \"The webview is loaded\" is shown on all the three steps\r\n\r\nExpected Result:\r\nThe load event of webview should not be called when it is simply removed and re-added.\r\n\r\n{code}\r\nvar win=Ti.UI.createWindow({backgroundColor:'white'});\r\nvar webview = Ti.UI.createWebView({\r\n\t\t\thtml : '',\r\n\t\t\ttop : 0,\r\n\t\t\theight : 200\r\n\t\t});\r\n\r\n\t\twebview.addEventListener('load', function() {\r\n\t\t\talert('The webview is loaded!');\r\n\t\t});\r\n\r\n\t\tvar b = Ti.UI.createButton({\r\n\t\t\ttitle : \"remove and add webview\",\r\n\t\t\ttop : 210\r\n\t\t});\r\n\t\tb.addEventListener(\"click\", function() {\r\n\t\t\twin.remove(webview);\r\n\t\t\twin.add(webview);\r\n\t\t});\r\n\r\n\t\tvar b2 = Ti.UI.createButton({\r\n\t\t\ttitle : \"remove and release and add webview\",\r\n\t\t\ttop : 280\r\n\t\t});\r\n\t\tb2.addEventListener(\"click\", function() {\r\n\t\t\twin.remove(webview);\r\n\t\t\twebview.reload();\r\n\t\t\twin.add(webview);\r\n\t\t});\r\nwin.add(webview);\r\nwin.add(b);\r\nwin.add(b2);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: The webview reloads on being removed and re-add to a window", "creator": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OSX: 10.9.2\r\nAppC Studio: 3.3.0.201405211748\r\nSDK: 3.3.0.v20140524224144\r\nCLI: 3.3.0-alpha5\r\nAlloy: 1.4.0-alpha4\r\nDevice: iPad4 (v7.1)", "closedSprints": [ { "id": 105, "state": "closed", "name": "2014 Sprint 11 SDK", "startDate": "2014-05-27T21:43:32.338Z", "endDate": "2014-06-07T00:00:00.000Z", "completeDate": "2014-06-09T21:36:37.587Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "307845", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is an expected change in behavior on the iOS platform. \r\n\r\nThe old behavior was that when you removed a child from a parent we would mark the JS object ready for GC and the view would be destroyed when the proxy was collected.\r\n\r\nIn 3.3.0 we became more aggressive with the memory cleanup. Essentially when you remove a child from a parent we not only mark the JS object ready for GC but also send the detach message to the proxy so the view is immediately collected.\r\n\r\nSo when you remove and readd, the view object is recreated and hence the load function gets called again.\r\n\r\nMarking this as Won't Fix.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-06T17:26:25.000+0000", "updated": "2014-06-06T17:26:25.000+0000" }, { "id": "317251", "author": { "name": "hasnarhaz", "key": "hasnarhaz", "displayName": "Hasnar Haz", "active": true, "timeZone": "Asia/Shanghai" }, "body": "I understand the aggressive approach. However, if a view is added to a new parent (a currently opened but obscured window) and then removed from the current parent, it is not garbage and so should not be collected. I expected the view to still be available (ie. not reloaded) when the new parent becomes the top window.\r\n\r\nIf this is the expected behaviour in 3.3.0, is there a workaround to get the old behavior?\r\n", "updateAuthor": { "name": "hasnarhaz", "key": "hasnarhaz", "displayName": "Hasnar Haz", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2014-08-06T09:17:54.000+0000", "updated": "2014-08-06T09:17:54.000+0000" }, { "id": "415207", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T23:04:18.000+0000", "updated": "2017-03-22T23:04:18.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }