Code Monkey home page Code Monkey logo

Comments (18)

CJY0208 avatar CJY0208 commented on June 25, 2024

CacheRoute 加上 saveScrollPosition 字段试试

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

帅哥 试了 没用 这个在android浏览器和web上是好的 就苹果设备的浏览器出现这个问题

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

好,我检查一下

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

好的 谢谢

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

查询了是由于 saveScrollPosition 函数仅操作了 document.documentElement 所致,在 safari 中应操作 document.scrollingElement

v1.8.3 已修复,可尝试

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

嗯嗯 谢谢

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

@yuankai12 我自个儿没有详细测试,如果修复了你的问题,可以的话也和我说一下哈!

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

@CJY0208 帅哥 还是有这个问题 麻烦你再看一下?

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

还是说 有些属性得加上去才能生效?

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

是的,CacheRoute 需要加上 saveScrollPosition 属性

<CacheRoute ... saveScrollPosition />

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

image

这样对吗?

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

不用 ="screen" 直接 saveScrollPosition 就好啦

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

你的设备是什么型号的呢?iOS 版本是多少

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

iphone 11, ios 13.1.3

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

我做了一个在线 demo,可以试着用你的设备访问一下此处:https://t8f8e.csb.app/#/

完整 demo 为:https://codesandbox.io/s/cacheroute-online-demo-t8f8e

如果 demo 中对滚动行为表现正常,那问题可能在别处

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 25, 2024

我借用同事 iOS 13.1.3 尝试了是正常的

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

12.0没问题 13.1.3有问题 没用苹果的手势返回

from react-router-cache-route.

Ykey12 avatar Ykey12 commented on June 25, 2024

这个问题已经处理完了 之前应该是因为升级版本了之后启动的时候 新版组件代码没有加载上造成的 谢谢

from react-router-cache-route.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.