Skip to content

Commit f887f15

Browse files
committed
Fix unwanted stopLoading when the web is still fetching page.
once there is a web request 1, response 200 and the the page is only for submit form data, we call the submit request 'request 2', before the 'request 2' response, if the wkjsBridge js inject, it result `[webView stopLoading]` task to stop the `request 2`
1 parent 5a91bac commit f887f15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WebViewJavascriptBridge/WKWebViewJavascriptBridge.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ - (void)webView:(WKWebView *)webView
127127
} else {
128128
[_base logUnkownMessage:url];
129129
}
130-
[webView stopLoading];
130+
decisionHandler(WKNavigationActionPolicyCancel);
131131
}
132132

133133
if (strongDelegate && [strongDelegate respondsToSelector:@selector(webView:decidePolicyForNavigationAction:decisionHandler:)]) {

0 commit comments

Comments
 (0)