Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4474] WebView goBack() method doesn't work for local files

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2013-03-21T00:58:00.000+0000
Affected Version/sRelease 1.7.0, Release 1.6.2
Fix Version/sRelease 3.0.2
ComponentsAndroid
Labelsandoid, look1, webview
ReporterEduardo Gomez
AssigneeMax Stepanov
Created2011-06-21T14:36:46.000+0000
Updated2017-03-20T17:00:41.000+0000

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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comments

  1. Lee Morris 2017-03-20

    Closing ticket as fixed.

JSON Source