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
8 changes: 6 additions & 2 deletions src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,12 @@ public void run() {
childView.setWebViewClient(new WebViewClient() {
// NB: wait for about:blank before dismissing
public void onPageFinished(WebView view, String url) {
if (dialog != null && !cordova.getActivity().isFinishing()) {
dialog.dismiss();
if (dialog != null && dialog.isShowing() && !cordova.getActivity().isFinishing()) {
try {
dialog.dismiss();
} catch(IllegalArgumentException e) {
LOG.e(LOG_TAG, "Caught exception when trying to close IAB dialog: " + e);
}
dialog = null;
}
}
Expand Down