Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h5环境下,切换页面时滚动条位置不准确 #8658

Closed
bgy10 opened this issue Feb 8, 2021 · 4 comments
Closed

h5环境下,切换页面时滚动条位置不准确 #8658

bgy10 opened this issue Feb 8, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@bgy10
Copy link

bgy10 commented Feb 8, 2021

相关平台

H5

复现仓库

https://github.com/bgy10/taro-demo
浏览器版本: chrome
使用框架: React

复现步骤

h5环境下,进入项目首页后,跳转到详情页,详情页内向下滚动一段距离后,再按顶部返回键(使用navigateBack),首页滚动位置会跟随详情页的滚动条位置

期望结果

navigateBack回退后,不应该缓存上页的滚动位置,而是真正的恢复原页

实际结果

navigateBack回退后,会跟随上页的滚动位置,经再次测试,就算是使用底部tabbar切换,虽然返回到顶,但滚动条位置也没有改变,实际上scrollTop值还会存在

环境信息

Taro CLI 3.0.25 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.16.1 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.13.4 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.0.25 => 3.0.25
      @tarojs/mini-runner: 3.0.25 => 3.0.25
      @tarojs/react: 3.0.25 => 3.0.25
      @tarojs/runtime: 3.0.25 => 3.0.25
      @tarojs/taro: 3.0.25 => 3.0.25
      @tarojs/webpack-runner: 3.0.25 => 3.0.25
      babel-preset-taro: 3.0.25 => 3.0.25
      eslint-config-taro: 3.0.25 => 3.0.25
      react: ^16.10.0 => 16.14.0
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Feb 8, 2021
@bgy10
Copy link
Author

bgy10 commented Feb 28, 2021

没维护人员看么?

@zZfd
Copy link

zZfd commented May 24, 2021

my heart is broken. such silly man.

@ZakaryCode
Copy link
Contributor

#7974 issue 重复,在最新版本已经修复

@ZakaryCode ZakaryCode added the duplicate This issue or pull request already exists label Dec 15, 2021
@taro-bot2 taro-bot2 bot closed this as completed Dec 15, 2021
@maigyweb
Copy link

@ZakaryCode 哪个版本解决了这个问题

@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

4 participants