CB-4586: Making loadUrl run on the UI thread for close dialog to stop the WebView error
This commit is contained in:
parent
be364c081d
commit
8b52796a89
@ -313,7 +313,17 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
*/
|
*/
|
||||||
private void closeDialog() {
|
private void closeDialog() {
|
||||||
try {
|
try {
|
||||||
this.inAppWebView.loadUrl("about:blank");
|
final WebView childView = this.inAppWebView;
|
||||||
|
Runnable runnable = new Runnable() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
childView.loadUrl("about:blank");
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
this.cordova.getActivity().runOnUiThread(runnable);
|
||||||
JSONObject obj = new JSONObject();
|
JSONObject obj = new JSONObject();
|
||||||
obj.put("type", EXIT_EVENT);
|
obj.put("type", EXIT_EVENT);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user