Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-2672

InAppBrowser loadstarted event on iOS returns URLS only after connecting and redirecting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.6.0
    • cordova-ios
    • None

    Description

      The loadstarted event in the inAppBrowser in iOS gets data from webViewDidStartLoad in UIWebViewDelegate. This returns url's only after they begin loading.
      Eg: navigation to www.gmail.com would return 'mail.google.com' instead of 'www.gmail.com' & 'mail.google.com'
      navigation to www.some-site-that-doesnt-exist.com would not return anything

      http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebViewDelegate_Protocol/Reference/Reference.html

      Correct implementation on android whose loadstarted event gets data from onPageStarted. onPageStarted returns url's before they are loaded.

      http://developer.android.com/reference/android/webkit/WebViewClient.html#onPageStarted(android.webkit.WebView, java.lang.String, android.graphics.Bitmap)

      Fix: use the webView:shouldStartLoadWithRequest:navigationType: to give events to loadStarted

      Attachments

        Activity

          People

            shravanrn Shravan Narayan
            shravanrn Shravan Narayan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: