[TIMOB-27396] iOS WKWebView: fix inverted condition on baseURL construction
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-10-25T15:43:59.000+0000 |
Affected Version/s | Release 8.0.0, Release 8.2.0 |
Fix Version/s | Release 8.3.0 |
Components | iOS |
Labels | WKWebView, engSchedule, ios, parity |
Reporter | Rene Pot |
Assignee | Vijay Singh |
Created | 2019-09-12T12:56:29.000+0000 |
Updated | 2019-10-25T15:43:59.000+0000 |
Description
Ticket created on behalf of Giorgio Mandolini
With the code below behavior is not the same on iOS as it is on Android.
$.webview.setHtml('<html><body><script>alert(window.location);</script></body></html>', {
baseURL: 'https://www.google.com/'
});
The alert(window.location) outputs https://www.google.com/
on Android, while on iOS the output is file:///https://www.google.com/
I found this strange behaviour because I'm trying to insert 3rd party embeds, often without success because they internally use relative protocol URLs that are eventually resolved as file:// instead of https://.
This was expected on 7.X, because of the absence of baseURL param, but on 8.X I was expected that baseURL would reflect on window.location (like it happens on Android).
PR: https://github.com/appcelerator/titanium_mobile/pull/11213
PR: https://github.com/appcelerator/titanium_mobile/pull/11213
FR Passed. Waiting on Jenkins build
merged to master
Closing ticket, fix verified in SDK version 8.3.0.v20191023125529. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11213