xiubojin / JXBWKWebView

An component WebView for iOS base on WKWebView
MIT License
736 stars 115 forks source link

关于webview返回 #37

Closed xiaolvyang closed 5 years ago

xiaolvyang commented 5 years ago

接入我的工程后,打开百度链接,进入二级详情页,会出现偶尔无法正常返回,点返回按钮直接从webview返回到原生页面,这种情况什么问题造成的呢

xiubojin commented 5 years ago

自己查一下不好吗

xiaolvyang commented 5 years ago

返回时打印webview.backForwardList.backlist.count,偶尔不能正常返回时,数值是0,应该是加载下一级也面时,上一级页面被干掉了,但是不知道问题出在哪里,可否指点一下

xiubojin commented 5 years ago

我试一下

xiaolvyang commented 5 years ago

好的,麻烦看看,进入同一个百度详情页,有时会出现这种情况,cangoback方法没有触发,接入我的项目之后才出现的,在你的demo中我没复现

xiubojin commented 5 years ago

我还是复现不出来,你最近还有这个问题吗?

G-Triumphant commented 1 year ago

针对你这个无法返回的问题,可以改为 NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:webUrl]]; req.HTTPMethod = "POST"; 然后再使用loadRequest去请求这个req

G-Triumphant commented 1 year ago

针对你这个无法返回的问题,可以改为 NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:webUrl]]; req.HTTPMethod = "POST"; 然后再使用loadRequest去请求这个req