[TIMOB-24095] Android: Cannot set HTML property in WebViews
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-11-17T20:58:14.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | qe-6.0.0 |
Reporter | Eric Wieber |
Assignee | Gary Mathews |
Created | 2016-11-03T16:27:37.000+0000 |
Updated | 2016-11-17T22:39:01.000+0000 |
Description
I am unable to set my HTML code using the
html
property of WebViews. Using the .setHtml()
method works, however. Both the property and method work as expected on iOS.
*Steps to reproduce issue*
1. Create a new app, using the code below
2. Build the app for your Android device
*Expected Results*
Both the blue and green boxes contain the string Here is my webstuff
*Actual Results*
Only the blue box (using .setHTML
) contains the string. The green box (using .html
) does not contain the string.
*Code*
var win = Ti.UI.createWindow();
var webview1 = Ti.UI.createWebView({height:100, top:0, borderColor:"blue"});
var webview2 = Ti.UI.createWebView({height:100, top:200, borderColor:"green"});
win.add(webview1);
win.add(webview2);
//Set the HTML using the .html property and .setHtml() method
webview1.setHtml('<html><body><p>Here is my webstuff</p></body></html>');
webview2.html = '<html><body><p>Here is my webstuff</p></body></html>';
win.open();
master: https://github.com/appcelerator/titanium_mobile/pull/8617
Verified the fix.
HTML
property can be set in WebViews. Closing. Appc Studio : 4.8.0.201611121409 SDK Version : 6.1.0.v20161117125827 Mac OS Version : 10.12 Xcode Version : Xcode 8.1 Build version 8B62 Appc CLI AND Appc NPM : {"NPM":"4.2.9-1","CLI":"6.0.0"} Ti CLI : 5.0.10 Alloy : 1.9.4 Node : v4.6.0 Device: running 7.1.1Nexus 6P