{ "id": "86938", "key": "TIMOB-8293", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13207", "name": "Sprint 2012-07", "archived": true, "released": true, "releaseDate": "2012-04-08" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-04-05T08:29:16.000+0000", "created": "2012-02-24T02:51:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "regression", "webview" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "17952", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "62090", "key": "TIMOB-1458", "fields": { "summary": "WebView doesn't keep html", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "16081", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "85091", "key": "TIMOB-7279", "fields": { "summary": "iOS: Add API to load WebView content from string with baseURL", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-06-22T16:26:25.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": "h2. Problem\r\n\r\nIn our app we create one instance of Ti.UI.WebView and reuse it for showing html content which is stored in a sql db. As the user navigates to different entries within a messages list, the new selected content is pushed into the webview by asigning the value to the html property of the webview.\r\n\r\nThe first time the value is set, the content shows up as expected.\r\n\r\nIf the value is set the second time the webview shows up empty.\r\n\r\nh2. Test case\r\nCreate a fresh mobile project and replace the default app.js with the following code:\r\n{code:lang=javascript|title=app.js}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar\tbutton1 = Titanium.UI.createButton({\r\n\ttitle:'open webview window',\r\n\twidth:220,\r\n\theight:40\r\n});\r\n\r\nwin1.add(button1);\r\n\r\nvar winwebview = Titanium.UI.createWindow({ \r\n title:'Window with webview',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar webview = Titanium.UI.createWebView({\r\n});\r\n\r\nwinwebview.add(webview);\r\n\r\nvar counter = 0;\r\nbutton1.addEventListener('click',function(e)\r\n{\r\n counter++;\r\n webview.html = '