Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 Web 应用程序在 IOS 本机应用程序的 WebView 中工作。页面左上角有一个按钮,点击按钮后会返回上一页。到目前为止一切顺利,但最近许多客户已将他们的 IOS 升级到 14 Beta2,现在后退按钮无法按预期工作。
我使用history.go(-1)返回,但是如果session历史长度为2,会执行history.go(-1),但是页面不会返回。网址也不会改变。如果用户继续打开新页面,那么它会再次工作。
有没有人知道它发生了什么?
我遇到同样的问题。使用history.push的时候可以使用setTimeout延迟一段时间,像这样
setTimeout(() => { history.push('xxx'); }, 100);