mirror of
https://github.com/shuto-cn/cordova-plugin-inappbrowser.git
synced 2025-04-28 20:40:10 +08:00
CB-6702 InAppBrowser hangs when opening more than one instance
github close #144
This commit is contained in:
parent
4d9e4884dd
commit
73ed40fe07
@ -377,6 +377,7 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
public void onPageFinished(WebView view, String url) {
|
public void onPageFinished(WebView view, String url) {
|
||||||
if (dialog != null) {
|
if (dialog != null) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
dialog = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -520,6 +521,12 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
|
// CB-6702 InAppBrowser hangs when opening more than one instance
|
||||||
|
if (dialog != null) {
|
||||||
|
dialog.dismiss();
|
||||||
|
};
|
||||||
|
|
||||||
// Let's create the main dialog
|
// Let's create the main dialog
|
||||||
dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar);
|
dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar);
|
||||||
dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog;
|
dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user