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 页面跳转后,新的页面没有滚动到页面顶部 #7974

Closed
deng-yc opened this issue Nov 4, 2020 · 3 comments · Fixed by #10841
Closed

h5 页面跳转后,新的页面没有滚动到页面顶部 #7974

deng-yc opened this issue Nov 4, 2020 · 3 comments · Fixed by #10841
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@deng-yc
Copy link

deng-yc commented Nov 4, 2020

相关平台

H5

复现仓库

https://github.com/deng-yc/taro-h5
浏览器版本: any
使用框架: React

复现步骤

  1. npm run dev:h5 运行

  2. 首页,先滚动到下面一些的元素

  3. 点击任意项,进入第二个页面, 第二个页面的高度也超过一屏

  4. 第二个页面并没有滚动到顶部

期望结果

跳转到新的页面,新页面应该滚动条位置应该在顶部

实际结果

未在顶部

环境信息

  Taro CLI 3.0.15 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.2.0 
      Yarn: 1.22.10
      npm: 6.14.4
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Nov 4, 2020
@ouzhou
Copy link

ouzhou commented Jan 15, 2021

有进展吗

@YoursOwen
Copy link

有人维护这个issue吗

@ninety19
Copy link

我给第一个页面最外层又包了一层 View,并添加了下面的样式
max-height: 100vh;
overflow: scroll;
解决了,不知道对你们是否有用

Chen-jj added a commit that referenced this issue Dec 9, 2021
* feat(component): add h5 component error tips

* feat(types): 补齐新增组件相关类型

* feat(route): taro-page 滚动条共享问题 fix #7974

Co-authored-by: chenjiajian <[email protected]>
@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
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants