Backbutton should go back in appview history before going back in our history stack.

JQMobile uses htmlPage#div to navigate "multipage" apps.  When the webview navigates between tags in the same page, it is added to the webview history.
This commit is contained in:
Bryce Curtis 2011-11-09 09:14:13 -06:00
parent e9fcb296bb
commit fd93404c7c

View File

@ -1450,7 +1450,11 @@ public class DroidGap extends PhonegapActivity {
else {
// Go to previous page in webview if it is possible to go back
if (this.urls.size() > 1) {
if (this.appView.canGoBack()) {
this.appView.goBack(); // This is needed to support curPage#diffLink, since they are added to appView's history, but not our history url array (JQMobile behavior)
return true;
}
else if (this.urls.size() > 1) {
this.backHistory();
return true;
}