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

WebView goBack() method doesn't work for local files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: Release 1.7.0, Release 1.6.2
    • Fix Version/s: Release 3.0.2
    • Component/s: Android
    • Labels:
    • Environment:

      + *Product*: Mobile
      + *Titanium SDK*: Mobile 1.6.2
      + *Platform OS*: Android
      + *Platform OS Version*: 2.2

      Description

      There is a HD ticket having this problem, where goBack() method doesn't work when local files are referenced in "url" property of a WebView,

      http://support.appcelerator.com/display/APP-327395

      Repro sequence:
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      webview = Ti.UI.createWebView(

      {id:'webview', url:'home.html', top:100, canGoBack:true }

      );

      win_home.add(webview);
      win_home.addEventListener('android:back',function()

      { webview.goBack(); }

      );
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Work around for it:
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      win1.addEventListener('android:back',function()

      { myWebView.url = 'index.html'; //Set file }

      );

      myWebView.reload(); //reload WebView
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        Attachments

          Activity

            People

            • Assignee:
              mstepanov Max Stepanov
              Reporter:
              egomez Eduardo Gomez (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-3826
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code