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

ios下切换tabbar白屏 #14935

Open
damon35868 opened this issue Dec 5, 2023 · 12 comments
Open

ios下切换tabbar白屏 #14935

damon35868 opened this issue Dec 5, 2023 · 12 comments
Labels
A-router Area - H5 路由相关 E-easy Helper Wanted - Easy F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@damon35868
Copy link

相关平台

H5

浏览器版本: safari 10
使用框架: React

复现步骤

进入网站后,点击切换底部的tabbar,会出现白屏

期望结果

正常跳转页面

实际结果

跳转后白屏

环境信息

 Taro CLI 3.6.19 environment info:
    System:
      OS: macOS 13.6.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.19 => 3.6.19 
      @tarojs/components: 3.6.19 => 3.6.19 
      @tarojs/helper: 3.6.19 => 3.6.19 
      @tarojs/plugin-framework-react: 3.6.19 => 3.6.19 
      @tarojs/plugin-platform-h5: 3.6.19 => 3.6.19 
      @tarojs/react: 3.6.19 => 3.6.19 
      @tarojs/runtime: 3.6.19 => 3.6.19 
      @tarojs/shared: 3.6.19 => 3.6.19 
      @tarojs/taro: 3.6.19 => 3.6.19 
      @tarojs/taro-loader: 3.6.19 => 3.6.19 
      @tarojs/webpack5-runner: 3.6.19 => 3.6.19 
      babel-preset-taro: 3.6.19 => 3.6.19 
      eslint-config-taro: 3.6.19 => 3.6.19 
      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 Dec 5, 2023
@github-project-automation github-project-automation bot moved this to Padding in H5 Dec 5, 2023
@ZakaryCode ZakaryCode added the question Further information is requested label Dec 5, 2023
@ZakaryCode
Copy link
Contributor

请补充可复现示例及对应环境、录屏等相关信息

@damon35868
Copy link
Author

请补充可复现示例及对应环境、录屏等相关信息

网址:https://wujuxian.net/media
视频:https://cdn.wujuxian.net/static/7aba6b4692ae184c8ca53000f182fa551701827846095.mp4

@ZakaryCode
Copy link
Contributor

所示网址并未能在 iOS 端复现到该问题,白屏状态有无更多信息?

@damon35868
Copy link
Author

所示网址并未能在 iOS 端复现到该问题,白屏状态有无更多信息?

进入后等页面渲染还没完成就快速切换,才可复现

@ZakaryCode
Copy link
Contributor

看了下还挺难复现的,应该是由于切换过快导致 taro_tabbar_page 类没有被正常加入到页面节点中,可以试试在 onshow 事件中为页面节点添加该类,来尝试规避该问题

@ZakaryCode ZakaryCode added A-router Area - H5 路由相关 E-easy Helper Wanted - Easy and removed question Further information is requested labels Dec 6, 2023
@damon35868
Copy link
Author

看了下还挺难复现的,应该是由于切换过快导致 taro_tabbar_page 类没有被正常加入到页面节点中,可以试试在 onshow 事件中为页面节点添加该类,来尝试规避该问题

好的我试试,添加到根结点吗?
这个问题我看到几年前就有issues了,很多人遇到,还请官方后续尽可能修复下,感谢

@ZakaryCode
Copy link
Contributor

好的我试试,添加到根结点吗?
这个问题我看到几年前就有issues了,很多人遇到,还请官方后续尽可能修复下,感谢

和之前不是一个问题,页面根节点,可以根据 ID 查

image

@damon35868
Copy link
Author

好的我试试,添加到根结点吗?
这个问题我看到几年前就有issues了,很多人遇到,还请官方后续尽可能修复下,感谢

和之前不是一个问题,页面根节点,可以根据 ID 查

image

/pages/index/index?stamp=AA
好的,用id话stamp=AA这个参数是固定的吗?

@ZakaryCode
Copy link
Contributor

好的,用id话stamp=AA这个参数是固定的吗?

不是,但是一般这个问题也就是首页会有,那就是 AA,当然从 Taro.getCurrentPages 取会更合理

@Brain777777
Copy link
Contributor

@damon35868 可以先回退到 v3.6.16 规避这个问题,我当时排查了下来,好像是因为这个 PR #14673 导致的

@ZakaryCode ZakaryCode moved this from Padding to 框架 in H5 May 2, 2024
@17
Copy link

17 commented Jul 31, 2024

这个问题最新 v3.6.34 依然存在

@17
Copy link

17 commented Jul 31, 2024

这个问题好像变严重了,我这边是加载完成点击上一个页面,肯定白屏。
从一开始就没有添加上 taro_tabbar_page
image
taro_tabbar_page 类消失了。


添加至 app.js 临时修复:

    if (H5) {
      setInterval(()=>{
        document.querySelectorAll('.taro_router>.taro_page:not(.taro_navigation_page)').forEach((e) => {
          e.classList.add('taro_tabbar_page')
        })
      }, 500)
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-router Area - H5 路由相关 E-easy Helper Wanted - Easy F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Status: 框架
Development

No branches or pull requests

4 participants