Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android GH-470 InAppBrowser: java.lang.IllegalArgumentException #616

Merged
merged 1 commit into from
Mar 20, 2020
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
6 changes: 3 additions & 3 deletions src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ else if (action.equals("show")) {
this.cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
if (dialog != null) {
if (dialog != null && !cordova.getActivity().isFinishing()) {
dialog.show();
}
}
Expand All @@ -326,7 +326,7 @@ else if (action.equals("hide")) {
this.cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
if (dialog != null) {
if (dialog != null && !cordova.getActivity().isFinishing()) {
dialog.hide();
}
}
Expand Down Expand Up @@ -537,7 +537,7 @@ public void run() {
childView.setWebViewClient(new WebViewClient() {
// NB: wait for about:blank before dismissing
public void onPageFinished(WebView view, String url) {
if (dialog != null) {
if (dialog != null && !cordova.getActivity().isFinishing()) {
dialog.dismiss();
dialog = null;
}
Expand Down