[TIMOB-27253] [iOS] Titanium APIs are able to be used for remote webviews
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-08-21T13:44:15.000+0000 |
Affected Version/s | Release 8.0.2, Release 8.1.0 |
Fix Version/s | Release 8.1.1 |
Components | iOS |
Labels | engSchedule, regression |
Reporter | Samir Mohammed |
Assignee | Vijay Singh |
Created | 2019-07-18T10:54:43.000+0000 |
Updated | 2019-08-21T13:44:15.000+0000 |
Description
When using a remote webview I am still able to log messages to the console (on Android I am unable to log messages when using a webview).
*app.js*
Click on the
Should display
Press
Press
Press
Press
Press
*Expected result*
Log message should not be logged when using a remote webview.
*Actual result*
Log message is still logged when using a remote webview.
var window = Ti.UI.createWindow({
});
var webview = Ti.UI.createWebView({
top: 0,
width: '100%',
height: 150
});
var loadButton = Ti.UI.createButton({
title: "load html",
left: 0,
top: 160,
width: 150,
height: 100
});
var logButton = Ti.UI.createButton({
title: "Log Message",
right: 0,
top: 160,
width: 150,
height: 100
});
var reloadButton = Ti.UI.createButton({
title: "reload webview",
left: 0,
top: 270,
width: 150,
height: 100
});
var remoteButton = Ti.UI.createButton({
title: "remote load webview",
right: 0,
top: 270,
width: 150,
height: 100
});
remoteButton.addEventListener("click", function() {
webview.url = "http://www.google.com";
});
loadButton.addEventListener("click", function() {
webview.url = "Wv.html";
});
logButton.addEventListener("click", function() {
webview.evalJS("Ti.API.info(\"-------------------------------hello\")");
});
reloadButton.addEventListener("click", function() {
webview.reload();
});
window.add(webview);
window.add(remoteButton);
window.add(loadButton);
window.add(logButton);
window.add(reloadButton);
window.open()
*Wv.html*
<html>
<body>
<table>
<tr>
<td id="test">test0</td>
</tr>
</table>
</body>
</html>
*Test Steps*
PR - https://github.com/appcelerator/titanium_mobile/pull/11065
FR passed. Waiting for 8.1.0 GA to merge this PR. Also back port PR is needed .
PR(8_1_X): https://github.com/appcelerator/titanium_mobile/pull/11086
Merged to master. Waiting on rebuild for 8_1_X
Merged to 8_1_X
*Closing ticket* fix verified in SDK version
8.2.0.v20190820104021
,8.1.1.v20190820143437
and8.3.0.v20190820103430
. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11065 PR(8_1_X): https://github.com/appcelerator/titanium_mobile/pull/11086