Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27396

iOS WKWebView: fix inverted condition on baseURL construction

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 8.0.0, Release 8.2.0
    • Fix Version/s: Release 8.3.0
    • Component/s: iOS
    • Environment:

      iOS with SDK 8.0.0.GA and higher

      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

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              topener Rene Pot
              Reviewer:
              Vijay Singh
              Tester:
              Satyam Sekhri
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code