{ "id": "169183", "key": "AC-5118", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2017-08-01T08:38:55.000+0000", "created": "2017-07-31T02:04:17.000+0000", "labels": [ "android", "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-03T05:00:47.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "On android platform the Webview ui component does not set the HTML property when loading local html. The ui populated the html file correctly but its html attribute is always null\r\n\r\nSample: (tested with SDK 6.1.1.GA, 6.1.2.v20170727160839)\r\n\r\nindex.xml:\r\n\r\n\r\nindex.js:\r\n$.index.open();\r\n$.webview.addEventListener('load', function(e) {\r\n setTimeout(function() {\r\n console.log($webview.html);\r\n console.log($webview.getHtml());\r\n },100);\r\n});\r\n\r\nThe log results:\r\nnull\r\nnull", "attachment": [], "flagged": false, "summary": "WebView does not set html property on Android", "creator": { "name": "rdiep", "key": "rdiep", "displayName": "Rio Diep", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rdiep", "key": "rdiep", "displayName": "Rio Diep", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Windows 10, JDK v1.8.0_131, Ti CLI 5.0.12, Ti SDK 6.1.2V20170727160839, android-23", "comment": { "comments": [ { "id": "425079", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~rdiep],\r\n\r\nI could not reproduce this issue with the following test code. Please try it then let us know.\r\n\r\n\r\nTitanium SDK\r\n SDK Version = 6.1.1.GA\r\nAndroid version: 6,7 \r\n \r\n\r\n{code:title=index.xml}\r\n\r\n\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n\r\n{code:title=index.js}\r\n$.win.open();\r\n$.webview.addEventListener('load', function(e) {\r\n\r\n\tsetTimeout(function() {\r\n\t\t$.webview.setHtml(\"hello\");\r\n\t\tTi.API.info($.webview.getHtml());\r\n\t}, 100);\r\n\r\n});\r\n\r\n{code}\r\n\r\nThanks\r\n", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-07-31T08:14:04.000+0000", "updated": "2017-07-31T08:14:04.000+0000" }, { "id": "425220", "author": { "name": "rdiep", "key": "rdiep", "displayName": "Rio Diep", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi @Motiur Rahman\r\n\r\nSorry for not explaining clearly from the start.\r\n\r\nWhat i meant was if you didn't have this line \r\n{code:java}\r\n$.webview.setHtml(\"hello\");\r\n{code}\r\n the html attribute of webview always returns null even the UI has loaded the content of local html file successfully.\r\n\r\n", "updateAuthor": { "name": "rdiep", "key": "rdiep", "displayName": "Rio Diep", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-01T22:48:18.000+0000", "updated": "2017-08-03T05:00:47.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }