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

fix(Sticky): initial sticky position #12601

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

nemo-shen
Copy link
Contributor

@nemo-shen nemo-shen commented Jan 29, 2024

fix issue: #12593
relate history issue: #12535
relate PR: #12547

@chenjiahan
我回退掉了 #12547 的改动,当时没考虑到异步组件的场景

issue: #12593 看起来比 issue: #12535 更严重,妥妥的反向修复🤡

这样的话top = 0在这种场景下是有意义的,而且没有很好的简单方式去处理,如果强行修复的话反而把代码搞复杂了。
原先的issue我想了下,理论上不应该出现两个重叠吸顶的情况,还是应该用issue上其他的评论方式去解决,比如设置一个 sticky-top

本来想加个单测去覆盖这种顶部有异步组件的场景,但是发现 <Sticky /> 组件用到的 useVisibilityChange 必须在浏览器场景下才可以,所以单测也不好加。

@nemo-shen nemo-shen marked this pull request as ready for review January 29, 2024 14:47
@chenjiahan chenjiahan merged commit 10444b5 into youzan:main Jan 30, 2024
5 checks passed
@chenjiahan
Copy link
Member

嗯嗯,这个改动先回退好了🤣 #12535 的问题相对影响面小一些,我们试试其他解决方式

CatsAndMice pushed a commit to CatsAndMice/vant that referenced this pull request Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants