Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,15 @@ public void onPageFinished(WebView view, String url) {
dialog.dismiss();
dialog = null;
}

// https://github.com/apache/cordova-plugin-inappbrowser/issues/290
if (url.equals("about:blank")) {
inAppWebView.onPause();
inAppWebView.removeAllViews();
inAppWebView.destroyDrawingCache();
inAppWebView.destroy();
inAppWebView = null;
}
}
});
// NB: From SDK 19: "If you call methods on WebView from any thread
Expand Down Expand Up @@ -948,9 +957,9 @@ public boolean onShowFileChooser (WebView webView, ValueCallback<Uri[]> filePath
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setBuiltInZoomControls(showZoomControls);
settings.setPluginState(android.webkit.WebSettings.PluginState.ON);

// download event

inAppWebView.setDownloadListener(
new DownloadListener(){
public void onDownloadStart(
Expand All @@ -971,7 +980,7 @@ public void onDownloadStart(
}
}
}
);
);

// Add postMessage interface
class JsObject {
Expand Down