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

Textarea onInput 事件取值的方法与文档不符 #13223

Closed
smoothdvd opened this issue Feb 3, 2023 · 1 comment · Fixed by #13230 or #13265
Closed

Textarea onInput 事件取值的方法与文档不符 #13223

smoothdvd opened this issue Feb 3, 2023 · 1 comment · Fixed by #13230 or #13265
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@smoothdvd
Copy link
Contributor

相关平台

H5

复现仓库

https://github.com/smoothdvd/taro-issues.git
浏览器版本: Safari 16.3
使用框架: React

复现步骤

在文本区输入字符,查看console的输出

期望结果

通过event.detail.value获取输入字符串的值

实际结果

通过event.nativeEvent.detail.value获取输入字符串的值

环境信息

👽 Taro v3.6.0


  Taro CLI 3.6.0 environment info:
    System:
      OS: Linux 6.1 Manjaro Linux undefined
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
      Yarn: 1.22.19 - /usr/bin/yarn
      npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.0 => 3.6.0 
      @tarojs/components: 3.6.0 => 3.6.0 
      @tarojs/helper: 3.6.0 => 3.6.0 
      @tarojs/plugin-framework-react: 3.6.0 => 3.6.0 
      @tarojs/plugin-platform-alipay: 3.6.0 => 3.6.0 
      @tarojs/plugin-platform-h5: 3.6.0 => 3.6.0 
      @tarojs/plugin-platform-jd: 3.6.0 => 3.6.0 
      @tarojs/plugin-platform-qq: 3.6.0 => 3.6.0 
      @tarojs/plugin-platform-swan: 3.6.0 => 3.6.0 
      @tarojs/plugin-platform-tt: 3.6.0 => 3.6.0 
      @tarojs/plugin-platform-weapp: 3.6.0 => 3.6.0 
      @tarojs/react: 3.6.0 => 3.6.0 
      @tarojs/runtime: 3.6.0 => 3.6.0 
      @tarojs/shared: 3.6.0 => 3.6.0 
      @tarojs/taro: 3.6.0 => 3.6.0 
      @tarojs/webpack5-runner: 3.6.0 => 3.6.0 
      babel-preset-taro: 3.6.0 => 3.6.0 
      eslint-config-taro: 3.6.0 => 3.6.0 
      react: ^18.0.0 => 18.2.0 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Feb 3, 2023
@ZakaryCode
Copy link
Contributor

ZakaryCode commented Feb 3, 2023

确实,3.6 直接使用 react 转换的事件和旧版本存在差异,下一个版本调整为旧版本使用的 addEventListener 修复该问题

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
2 participants