-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ScrollView 存在 children 错乱的问题 #10365
Comments
@Chen-jj 大佬,这个 bug 比较紧急,是组件库里面发现的。希望能帮忙修复一下。 |
@luckyadam @zhiqingchen @iChengbo 这个问题啥时候能解决下,大佬们。 |
我也遇到了,回到顶部内容顺序错乱了 |
@Chen-jj 大佬,这个bug麻烦看一下。 |
@tgioer @tiankongoyll 的确存在这个问题,感觉是 React 结合使用 Stencil 时,Stencil 的 无意中发现每个 Stencil 组件都有一些 Comment 节点,把它们都去除了就能避免上述问题。 猜测 Comment 节点用于处理 slot 的 diff,而在我们这种情况下出现了该问题。 我提交了一个 PR,尝试在 各位可以拉取此分支,下载 Taro 项目源码,编译 |
好滴大佬 |
H5 暂时先用 document.querySelector( |
相关平台
H5
复现仓库
https://github.com/taroify/taro339-maprender.git
浏览器版本: Chrome/93.0.4577.82 Safari/537.36
使用框架: React
复现步骤
ScrollView 存在 children 错乱的问题
当 ScrollView children 是一个由 View 包裹的组件数组,在同时更新组件数组和 scrollLeft 会存在子数组内部排序混乱的问题。
代码如下:
nodes 的顺序是 1,2 但是当改变 scrollLeft 值以后出现顺序错乱为 2,1。
期望结果
nodes 的顺序是 1,2
实际结果
nodes 的顺序是 2,1
环境信息
The text was updated successfully, but these errors were encountered: