taro icon indicating copy to clipboard operation
taro copied to clipboard

BUG:二次进入页面,页面内某元素id会被自动变更

Open geeklibin opened this issue 3 years ago • 3 comments
trafficstars

相关平台

微信小程序

小程序基础库: 2.25.3 使用框架: Vue 3

复现步骤

npm run build:weapp

页面B内有一个元素Canvas,设了ID值。从页面A跳转到(Taro.navigateTo)页面B,再返回A页面。第二次再重新进入B页面,B页面的canvas的id属性自动变了,导致第二次进入页面找不到该元素。。 image image

期望结果

反复进入页面canvas的id属性不应该变化。

实际结果

第二次进入页面后canvas的id属性自动变了

环境信息

Taro CLI 3.5.4 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.7.0 - ~/.nvm/versions/node/v14.7.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v14.7.0/bin/yarn
      npm: 6.14.7 - ~/.nvm/versions/node/v14.7.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.4 => 3.5.4 
      @tarojs/components: 3.5.4 => 3.5.4 
      @tarojs/helper: 3.5.4 => 3.5.4 
      @tarojs/plugin-framework-vue3: 3.5.4 => 3.5.4 
      @tarojs/plugin-html: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-alipay: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-jd: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-qq: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-swan: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-tt: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-weapp: 3.5.4 => 3.5.4 
      @tarojs/router: 3.5.4 => 3.5.4 
      @tarojs/runtime: 3.5.4 => 3.5.4 
      @tarojs/shared: 3.5.4 => 3.5.4 
      @tarojs/taro: 3.5.4 => 3.5.4 
      @tarojs/taro-h5: 3.5.4 => 3.5.4 
      @tarojs/webpack5-runner: 3.5.4 => 3.5.4 
      babel-preset-taro: 3.5.4 => 3.5.4 
      eslint-config-taro: 3.5.4 => 3.5.4

geeklibin avatar Aug 28 '22 14:08 geeklibin

https://github.com/NervJS/taro/issues/11843#issuecomment-1139474610

longhaoteng avatar Aug 30 '22 06:08 longhaoteng

@geeklibin 3.5.5 没有复现,麻烦提供一下 demo

Chen-jj avatar Sep 05 '22 02:09 Chen-jj

@geeklibin 3.5.5 没有复现,麻烦提供一下 demo

这是复现demo源码链接:(必须build构建:npm run build:weapp才会出现这个bug); https://github.com/geeklibin/taro_bug_demo.git

geeklibin avatar Sep 05 '22 07:09 geeklibin

我也遇到这个问题了,本地测试是好的,二次进入没问题,打包以后就有问题了

forestRhapsody avatar Nov 10 '22 03:11 forestRhapsody

@Chen-jj 这么严重的问题,没有人修复嘛?

geeklibin avatar Nov 11 '22 01:11 geeklibin

@geeklibin 3.5.5 没有复现,麻烦提供一下 demo

只出现在 打包环境,开发是好的。打包了去运行就有问题

geeklibin avatar Nov 16 '22 09:11 geeklibin