Comments (18)
CacheRoute 加上 saveScrollPosition 字段试试
from react-router-cache-route.
帅哥 试了 没用 这个在android浏览器和web上是好的 就苹果设备的浏览器出现这个问题
from react-router-cache-route.
好,我检查一下
from react-router-cache-route.
好的 谢谢
from react-router-cache-route.
查询了是由于 saveScrollPosition 函数仅操作了 document.documentElement 所致,在 safari 中应操作 document.scrollingElement
v1.8.3 已修复,可尝试
from react-router-cache-route.
嗯嗯 谢谢
from react-router-cache-route.
@yuankai12 我自个儿没有详细测试,如果修复了你的问题,可以的话也和我说一下哈!
from react-router-cache-route.
@CJY0208 帅哥 还是有这个问题 麻烦你再看一下?
from react-router-cache-route.
还是说 有些属性得加上去才能生效?
from react-router-cache-route.
是的,CacheRoute 需要加上 saveScrollPosition 属性
<CacheRoute ... saveScrollPosition />
from react-router-cache-route.
这样对吗?
from react-router-cache-route.
不用 ="screen" 直接 saveScrollPosition 就好啦
from react-router-cache-route.
你的设备是什么型号的呢?iOS 版本是多少
from react-router-cache-route.
iphone 11, ios 13.1.3
from react-router-cache-route.
我做了一个在线 demo,可以试着用你的设备访问一下此处:https://t8f8e.csb.app/#/
完整 demo 为:https://codesandbox.io/s/cacheroute-online-demo-t8f8e
如果 demo 中对滚动行为表现正常,那问题可能在别处
from react-router-cache-route.
我借用同事 iOS 13.1.3 尝试了是正常的
from react-router-cache-route.
12.0没问题 13.1.3有问题 没用苹果的手势返回
from react-router-cache-route.
这个问题已经处理完了 之前应该是因为升级版本了之后启动的时候 新版组件代码没有加载上造成的 谢谢
from react-router-cache-route.
Related Issues (20)
- CacheRoute pathname prop is gone HOT 5
- push和replace时不使用已经缓存的页面 HOT 2
- 记录启用 multiple 时 href 中有中文的一个 BUG 及解决方案 HOT 2
- 用react 17 的ReactDOM.render(), 缓存成功, 但不支持react 18的版本 ReactDOM.createRoot() 缓存失败,请问有兼容方案? HOT 6
- 带参数详情页面多份数据缓存如何做? HOT 4
- 带有参数的页面,离开页面的时候useParams会返回undefined,导致无法维持原来的页面组件状态 HOT 3
- 请问下作者如何处理跳转路径完全相同,但是state不同的情况 HOT 2
- 路由里存在中文,路由会缓存2份
- 开启multiple后,带querystring的路由缓存失败
- 请问 在cache-route中如何实现仅在切换路由列表时卸载当前页面组件 谢谢 HOT 1
- `CacheSwitch` re-mount the same component if path changes HOT 1
- item/detail/:id 这种带参数的路由缓存不了,
- 在路由back后,怎么让缓存的组件不重新render呢? HOT 1
- 怎么实现头部Tabs页签的效果?能否提供一些示例? HOT 1
- How to turn off the display:none of the component HOT 5
- 使用CacheRoute缓存路由,出现闪烁
- 【咨询】为什么 Updatable 内部的 Freeze 需要 Delay 1s HOT 2
- CacheSwitch不会触发Suspense的fallback HOT 3
- iframe嵌套状态保留
- 打包部署后报错 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-router-cache-route.