Repository navigation
fix(sticky-header): 修正 RN/Web 的 offset-top 吸顶位置与状态判断 - #2610
Merged
Merged
Conversation
Collaborator
|
发现一个 P2 问题:RN 首次测量前会产生错误位移,存在首屏跳动风险。 位置:mpx-sticky-header.tsx:128–132。
建议在首次测量完成前保持正常布局,再启用吸顶变换。 验证:使用 PR 提交 e93d571 及其父提交的实际组件代码,通过 React Test Renderer 和模拟的 Animated/异步测量接口复现了上述位移差异;测量完成后的 RN/Web 吸顶阈值检查通过。尚未进行真机验证,实际可见跳动仍需在设备上确认。 |
hiyuki
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 RN / Web 中 sticky-header 设置非零 offset-top 时吸顶启动过晚、stickontopchange 判断与偏移位置不一致的问题。例如 headerTop=100、offset-top=40 时,应从滚动位置 60 开始固定在距容器顶部 40 的位置,而不是等到滚动超过 100 后再补偿偏移。