beforeload firing on alternate requests fixed #bug686
This commit is contained in:
parent
7a32aeaea8
commit
6652636471
@ -267,10 +267,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
@Override
|
||||
public void run() {
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O) {
|
||||
currentClient.waitForBeforeload = false;
|
||||
inAppWebView.setWebViewClient(currentClient);
|
||||
} else {
|
||||
((InAppBrowserClient)inAppWebView.getWebViewClient()).waitForBeforeload = false;
|
||||
}
|
||||
inAppWebView.loadUrl(url);
|
||||
}
|
||||
@ -1202,7 +1199,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
EditText edittext;
|
||||
CordovaWebView webView;
|
||||
String beforeload;
|
||||
boolean waitForBeforeload;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@ -1214,7 +1210,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
this.webView = webView;
|
||||
this.edittext = mEditText;
|
||||
this.beforeload = beforeload;
|
||||
this.waitForBeforeload = beforeload != null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1275,7 +1270,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
}
|
||||
|
||||
// On first URL change, initiate JS callback. Only after the beforeload event, continue.
|
||||
if (useBeforeload && this.waitForBeforeload) {
|
||||
if (useBeforeload) {
|
||||
if(sendBeforeLoad(url, method)) {
|
||||
return true;
|
||||
}
|
||||
@ -1370,9 +1365,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
if (useBeforeload) {
|
||||
this.waitForBeforeload = true;
|
||||
}
|
||||
return override;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user