You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/16 21:40:06 UTC

[GitHub] [cordova-plugin-inappbrowser] ozgeekemen commented on issue #384: Fatal Exception occured due to "not attached to window" on AndroidP

ozgeekemen commented on issue #384: Fatal Exception occured due to "not attached to window" on AndroidP
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/384#issuecomment-614911199
 
 
   When I change this
   `                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();
                               dialog = null;
                           }
                       }
                   });
                   // NB: From SDK 19: "If you call methods on WebView from any thread
                   // other than your app's UI thread, it can cause unexpected results."
                   // http://developer.android.com/guide/webapps/migrating.html#Threads
                   childView.loadUrl("about:blank");`
   
   to this
   
   `                        if (dialog != null && !cordova.getActivity().isFinishing()) {
                               dialog.dismiss();
                               dialog = null;
                           }`
   
   error is disappearing. So loading "about:blank" is it necessary here ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org