You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "enzi.wang (JIRA)" <ji...@apache.org> on 2012/09/11 05:30:08 UTC
[jira] [Updated] (CB-1408) DroidGap only clear appView's history
in clearHistory method
[ https://issues.apache.org/jira/browse/CB-1408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
enzi.wang updated CB-1408:
--------------------------
Description:
DroidGap only clear appView's history in clearHistory method.
DroidGap.java:
public void clearHistory() {
this.appView.clearHistory();
}
But it also used managed urls in backHistory method:
public boolean backHistory() {
if (this.appView != null) {
return appView.backHistory();
}
return false;
}
In CordovaWebView.java:
backHistory(){
...
// If our managed history has prev url
if (this.urls.size() > 1) {
this.urls.pop(); // Pop current url
String url = this.urls.pop(); // Pop prev url that we want to load, since it will be added back by loadUrl()
this.loadUrl(url);
return true;
}
...
}
The managed urls is private.
We do not have any places to clear all of these histories:
1、appView's History
2、our managed urls history
was:
DroidGap only clear appView's history in clearHistory method.
DroidGap.java:
/**
* Clear web history in this web view.
*/
public void clearHistory() {
this.appView.clearHistory();
}
But it also used managed urls in backHistory method:
public boolean backHistory() {
if (this.appView != null) {
return appView.backHistory();
}
return false;
}
In CordovaWebView.java:
backHistory(){
...
// If our managed history has prev url
if (this.urls.size() > 1) {
this.urls.pop(); // Pop current url
String url = this.urls.pop(); // Pop prev url that we want to load, since it will be added back by loadUrl()
this.loadUrl(url);
return true;
}
...
}
The managed urls is private.
We do not have any places to clear all of these histories:
1、appView's History
2、our managed urls history
> DroidGap only clear appView's history in clearHistory method
> ---------------------------------------------------------------
>
> Key: CB-1408
> URL: https://issues.apache.org/jira/browse/CB-1408
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.0.0
> Reporter: enzi.wang
> Assignee: Joe Bowser
> Priority: Minor
> Fix For: 2.1.0
>
>
> DroidGap only clear appView's history in clearHistory method.
> DroidGap.java:
> public void clearHistory() {
> this.appView.clearHistory();
> }
> But it also used managed urls in backHistory method:
> public boolean backHistory() {
> if (this.appView != null) {
> return appView.backHistory();
> }
> return false;
> }
> In CordovaWebView.java:
> backHistory(){
> ...
> // If our managed history has prev url
> if (this.urls.size() > 1) {
> this.urls.pop(); // Pop current url
> String url = this.urls.pop(); // Pop prev url that we want to load, since it will be added back by loadUrl()
> this.loadUrl(url);
> return true;
> }
> ...
> }
> The managed urls is private.
> We do not have any places to clear all of these histories:
> 1、appView's History
> 2、our managed urls history
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira