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

Taro V3 event stopPropagation 不起作用 #7004

Closed
hlouis opened this issue Jul 11, 2020 · 1 comment
Closed

Taro V3 event stopPropagation 不起作用 #7004

hlouis opened this issue Jul 11, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@hlouis
Copy link

hlouis commented Jul 11, 2020

相关平台

微信小程序

复现仓库

https://github.com/hlouis/Taro-v3-event-bug
小程序基础库: 2.11.2
使用框架: React

复现步骤

项目启动之后,在首页即可重现这个问题,中间的白色方块虽然将 touchMove 事件取消冒泡,但是依然可以让后面的 Page 进行 scroll

期望结果

使用 eatEvent 函数的事件在编译成 Wxml 之后,会使用 catch:xxx event 的形式实现阻止事件冒泡传播

实际结果

使用 eatEvent 函数的事件在编译成 Wxml 之后,仍然使用 bind:xxx event 的形式,导致事件继续冒泡

环境信息

❯ taro info
👽 Taro v3.0.2


  Taro CLI 3.0.2 environment info:
    System:
      OS: macOS 10.16
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.5.0 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.5 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.0.2 => 3.0.2
      @tarojs/mini-runner: 3.0.2 => 3.0.2
      @tarojs/react: 3.0.2 => 3.0.2
      @tarojs/runtime: 3.0.2 => 3.0.2
      @tarojs/taro: 3.0.2 => 3.0.2
      @tarojs/webpack-runner: 3.0.2 => 3.0.2
      babel-preset-taro: 3.0.2 => 3.0.2
      eslint-config-taro: 3.0.2 => 3.0.2
      react: ^16.10.0 => 16.13.1
    npmGlobalPackages:
      typescript: 3.3.1
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 11, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 30, 2020

duplicate #7009

@Chen-jj Chen-jj closed this as completed Jul 30, 2020
@Chen-jj Chen-jj added the duplicate This issue or pull request already exists label Jul 30, 2020
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-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants