Skip to content

Overlay 类型的组件(Popup, ActionSheet, Picker)在显示时均会导致页面中 ScrollView 重置到顶部 #2744

Description

@Aliveing

NutUI React 包名

@nutui/nutui-react-taro

NutUI React 版本号

2.7.0

平台

weapp

重现链接

https://github.com/Aliveing/nutui-react-taro-demo.git

重现步骤

  1. 滚动上方列表到某个位置(比如 9 在最上方)
  2. 点击「展示弹出层」
  3. 列表重置到顶部(0 在最上方)
  4. 可以切换注释测试 ActionSheet、Picker
  5. Dialog、Popover 展示时不会重置 ScrollView 滚动位置

期望的结果是什么?

弹出层类型的组件,可以不重置 ScrollView

实际的结果是什么?

会导致页面中 ScrollView 重置到顶部

环境信息

👽 Taro v4.0.7

Taro CLI 4.0.7 environment info:
System:
OS: macOS 15.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
npmPackages:
@tarojs/cli: 4.0.7 => 4.0.7
@tarojs/components: 4.0.7 => 4.0.7
@tarojs/helper: 4.0.7 => 4.0.7
@tarojs/plugin-framework-react: 4.0.7 => 4.0.7
@tarojs/plugin-html: 4.0.7 => 4.0.7
@tarojs/plugin-platform-alipay: 4.0.7 => 4.0.7
@tarojs/plugin-platform-h5: 4.0.7 => 4.0.7
@tarojs/plugin-platform-jd: 4.0.7 => 4.0.7
@tarojs/plugin-platform-qq: 4.0.7 => 4.0.7
@tarojs/plugin-platform-swan: 4.0.7 => 4.0.7
@tarojs/plugin-platform-tt: 4.0.7 => 4.0.7
@tarojs/plugin-platform-weapp: 4.0.7 => 4.0.7
@tarojs/react: 4.0.7 => 4.0.7
@tarojs/runtime: 4.0.7 => 4.0.7
@tarojs/shared: 4.0.7 => 4.0.7
@tarojs/taro: 4.0.7 => 4.0.7
@tarojs/taro-loader: 4.0.7 => 4.0.7
@tarojs/webpack5-runner: 4.0.7 => 4.0.7
babel-preset-taro: 4.0.7 => 4.0.7
eslint-config-taro: 4.0.7 => 4.0.7
react: ^18.0.0 => 18.3.1

其他补充信息

CleanShot.2024-11-12.at.21.58.56.mp4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions