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: scroll not working when overflowY is set to auto/scroll and overflowX not set #681

Merged
merged 3 commits into from
Sep 13, 2021

Conversation

temper357
Copy link
Contributor

Closes #673

修复当一个方向的 overflow 设置为 auto/scroll,另一方向 overflow 未设置时滚动失效。(由于 simulateSwipe 失效 #680 测试用例先 disable)。

  • 原因:当只有一个方向的 overflow 设置为 auto/scroll 时会创建 repaintBoundary,此时会复制原来 renderBoxModel,但是遗漏了复制 pointListener 方法,导致新创建的 repaintBoundary 的 renderBoxModel 不会响应 pointerDown 事件。之前两个方向的 overflow 都设置不会有问题的原因是,由于 repaintBoundary 只会创建一次,会在第2次设置 overflow 的时候将 pointListener 挂到 renderBoxModel 上。

@andycall andycall merged commit 4d4738a into main Sep 13, 2021
@andycall andycall deleted the fix/single-overflow-fail branch September 13, 2021 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

只设置 overflowY 为 auto 不设置 overflowX 时滚动失效
3 participants