{ "id": "64133", "key": "TIMOB-3501", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-01-09T18:55:44.000+0000", "created": "2011-04-15T03:45:57.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect", "reported-1.6.1" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-09T18:55:44.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Testing using:

\n\n

The following code demonstrates that webview.reload() does not\nreload the url or html properties. Hence,\nalthough all the other webview properties are retained (ie, width,\nheight, backgroundColor etc), the contents of the webview must be\nmanually reloaded. This workaround is included in the code, where\neither the url or html properties are\nreassigned:

\n

app.js:

\n
\nvar win = Ti.UI.createWindow();\n\nvar thisHTML = \"<html><body><button onClick=\\\"Ti.App.fireEvent(\\'alert\\');\\\">Click me to fire an alert</button><button onClick=\\\"Ti.App.fireEvent(\\'reload\\');\\\">Click me to reload webview</button></body></html>\";\n\nvar webview = Ti.UI.createWebView({\n    backgroundColor:\"red\",\n    url:\"webview.html\", // contents will not be reloaded on webview.reload()\n//  html:thisHTML, // this will also exhibit the problem when webview.reload() is used\n    height:300,\n    width:300\n});\n \nTi.App.addEventListener(\"reload\", function(){\n    Ti.API.info(\"Reloaded Webview\");\n    alert(\"fireEvent from webview - reload Webview\");\n    webview.reload();\n//  webview.url = \"webview.html\"; // this can be used as a workaround\n//  webview.html = thisHTML; // this can be used as a workaround\n});\n \nTi.App.addEventListener(\"alert\", function(){\n    Ti.API.info(\"fireEvent from webview - alert\");\n    alert(\"Alert was Clicked.\");\n});\n\nwin.add(webview);\nwin.open();\n
\n

webview.html:

\n
\n<html>\n<body>\n<button onClick=\"Ti.App.fireEvent('alert');\">Click me to fire an alert</button>\n<button onClick=\"Ti.App.fireEvent('reload');\">Click me to reload webview</button>\n</body>\n</html>\n
{html}", "attachment": [], "flagged": false, "summary": "webview reload() does not reload `url` or `html `properties", "creator": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "130721", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Note: the url case should be supported. Not sure it's worth\ntrying to keep an unmodified version of the html source around.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:45:57.000+0000", "updated": "2011-04-15T03:45:57.000+0000" }, { "id": "242884", "author": { "name": "sourabh@volitionlabs.com", "key": "sourabh@volitionlabs.com", "displayName": "sourabh kaley", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Neither reload() works nor repaint() on iPhone?", "updateAuthor": { "name": "sourabh@volitionlabs.com", "key": "sourabh@volitionlabs.com", "displayName": "sourabh kaley", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-03-19T11:27:15.000+0000", "updated": "2013-03-19T11:27:15.000+0000" }, { "id": "453550", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. Updating, or creating code may not reproduce the issue reported, or be a valid test case.\r\n\r\nIf community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-09T18:55:44.000+0000", "updated": "2020-01-09T18:55:44.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }