DSBridge-IOS icon indicating copy to clipboard operation
DSBridge-IOS copied to clipboard

webview crash: Completion handler passed to -[DWKWebView webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called

Open gdxz123 opened this issue 5 years ago • 2 comments

how to appear this crash: sometime,H5 need to write code like: setTimeout("alert('yo man!')",1000) when users navigate into a dwkwebview controller, the H5 delay a alert work, users pop out the dwkwebview controller, the webview will not dealloc immediately and the alert appeared. after a few seconds the webview will be dealloc, and the dwkwebview crash.

we must call alert completion handler before webview dealloc.

gdxz123 avatar Sep 17 '19 05:09 gdxz123

13_50_18__09_17_2019 I fixed this crash. please check it out

gdxz123 avatar Sep 17 '19 05:09 gdxz123

I got the same problem, has no idea.

nick5683 avatar Sep 17 '19 09:09 nick5683