{ "id": "126058", "key": "TIMOB-16418", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": null, "resolutiondate": null, "created": "2014-02-07T00:31:26.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:48.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem Description\r\nIf you have webviews in your scrollableview, they will reload every time any other view is added to the scrollableview. \r\n\r\nCan we try not to reload the webviews already there?\r\n\r\nh4. Code Sample\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\n\r\nvar scrollableview = Ti.UI.createScrollableView({\r\n\ttop : 0,\r\n\theight : 300,\r\n\tcacheSize : 10,\r\n\tshowPagingControl:true,\r\n\tbackgroundColor:'white',\r\n});\r\n\r\nvar webview = Ti.UI.createWebView({\r\n\thtml : '',\r\n\ttop : 0,\r\n\theight : 300\r\n});\r\n\r\nwebview.addEventListener('load', function() {\r\n\talert('The webview is loaded!');\r\n});\r\n\r\nvar b = Ti.UI.createButton({\r\n\ttitle : \"add new view\",\r\n\ttop : 400\r\n});\r\nb.addEventListener(\"click\", function() {\r\n\tscrollableview.addView(Ti.UI.createView({\r\n\t\thtml : 'hola!',\r\n\t\ttop : 0,\r\n\t\theight : 300\r\n\t}));\r\n});\r\n\r\nwin.add(scrollableview);\r\nscrollableview.addView(webview);\r\nwin.add(b);\r\nwin.open(); \r\n{code}\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile (classic) project.\r\n2. Paste the testcase to app.js\r\n3. Run in simulator iOS\r\n4. Click on the button to add a second view. \r\n5. You will get an alert that the webview reloaded. \r\n\r\nh4. Extra info\r\nQ&A Link: http://developer.appcelerator.com/question/162289/is-it-possible-to-prevent-webviews-on-scrollableview-from-reloading-when-adding-new-views-to-the-scrollableview", "attachment": [], "flagged": false, "summary": "iOS: Scrollableview forces a reload of webview every single time that a view is added", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }