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

fix(android): call WebView.stopLoading() from main thread #11169

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.HashMap;
import java.util.Map;

import android.os.Handler;
import android.support.annotation.StringRes;
import android.view.ActionMode;
import android.view.Menu;
Expand Down Expand Up @@ -52,6 +53,8 @@
import android.webkit.WebSettings;
import android.webkit.WebView;

import static android.os.Looper.getMainLooper;

@SuppressWarnings("deprecation")
public class TiUIWebView extends TiUIView
{
Expand Down Expand Up @@ -1066,7 +1069,13 @@ public void reload()

public void stopLoading()
{
getWebView().stopLoading();
new Handler(getMainLooper()).post(new Runnable() {
@Override
public void run()
{
getWebView().stopLoading();
}
});
}

public boolean shouldInjectBindingCode()
Expand Down