NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.28k stars 4.76k forks source link

RN下开启enablePullDownRefresh:true 的时候,页面ScrollView滑动异常,大概率被onPullDown捕获到 #13905

Open fanlvwen opened 1 year ago

fanlvwen commented 1 year ago

相关平台

React Native

使用框架: React

复现步骤

运行补充说明中的是demo代码,提issue的时候填不上去

期望结果

期望触摸在某个滑动组件上,哪个组件就捕获滑动事件,如果不是滑动到顶部,不要触发下拉刷新事件

或者有无方法动态设置disableScroll

实际结果

页面上本身有一个ScrollView,点击‘show pop’的弹窗上也有一个ScrollView,向下滑动时,会误触下拉刷新事件

环境信息

 Taro CLI 3.6.6 environment info:
    System:
      OS: Windows 10 10.0.17763
    Binaries:
      Node: 16.9.0 - D:\nodejs\node.EXE
      Yarn: 1.22.19 - D:\nodejs\yarn.CMD
      npm: 7.21.1 - D:\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.6 => 3.6.6
      @tarojs/components: 3.6.6 => 3.6.6
      @tarojs/components-rn: 3.6.6 => 3.6.6
      @tarojs/helper: 3.6.6 => 3.6.6
      @tarojs/plugin-framework-react: 3.6.6 => 3.6.6
      @tarojs/plugin-platform-alipay: 3.6.6 => 3.6.6
      @tarojs/plugin-platform-h5: 3.6.6 => 3.6.6
      @tarojs/plugin-platform-jd: 3.6.6 => 3.6.6
      @tarojs/plugin-platform-qq: 3.6.6 => 3.6.6
      @tarojs/plugin-platform-swan: 3.6.6 => 3.6.6
      @tarojs/plugin-platform-tt: 3.6.6 => 3.6.6
      @tarojs/plugin-platform-weapp: 3.6.6 => 3.6.6
      @tarojs/plugin-react-devtools: 3.6.6 => 3.6.6
      @tarojs/react: 3.6.6 => 3.6.6
      @tarojs/rn-runner: 3.6.6 => 3.6.6
      @tarojs/rn-supporter: 3.6.6 => 3.6.6
      @tarojs/runtime: 3.6.6 => 3.6.6
      @tarojs/runtime-rn: 3.6.6 => 3.6.6
      @tarojs/shared: 3.6.6 => 3.6.6
      @tarojs/taro: 3.6.6 => 3.6.6
      @tarojs/taro-rn: 3.6.6 => 3.6.6
      @tarojs/webpack5-runner: 3.6.6 => 3.6.6
      babel-preset-taro: 3.6.6 => 3.6.6
      expo: ~47.0.3 => 47.0.14
      react: ^18.1.0 => 18.2.0
      react-native: ^0.70.1 => 0.70.9
      taro-ui: ^2.3.0 => 2.3.4

补充信息

重现代码链接如下

https://github.com/fanlvwen/demo/blob/main/ScrollViewTest

fanlvwen commented 1 year ago

@luckyadam 大佬救命

fanlvwen commented 1 year ago

我的需求就是本身页面可以滑动,也可以下拉刷新,然后弹窗上面的内容也可以滑动,大家各自的滑动不要干扰

lovelyqun commented 1 year ago

我也遇到了相同的问题,scrollview 里面的view组件向下滚动,会触发scrollview的下拉刷新事件