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

开启虚拟列表的select在滚动条达到底部时,继续滚动的行为会影响到select内部的行为 #47306

Open
Cacolet opened this issue Feb 2, 2024 · 0 comments
Labels
improvement improve some features Inactive

Comments

@Cacolet
Copy link

Cacolet commented Feb 2, 2024

动画

Reproduction link

https://ant.design/components/select-cn

Steps to reproduce

复现条件:
1、select下拉列表有滚动条
2、外部列表课滚动

复现步骤:
1、将select滚动条置于底部,这时等待50ms的lock,后续可继续滚动滚动条,这时就是滚动外部的滚动条了,
2、滚动到鼠标离开下拉框后,立即反向滚动,select内部的滚动条也会向上滚动,即使鼠标没在下拉框内部

What is expected?

到鼠标离开下拉框后,除非鼠标重新回到下拉框内部,否则不应该触发内部的scroll事件

What is actually happening?

目前是会触发上述行为的

Environment Info
antd 5.13.3
React 17.*
System win 10
Browser chrome 120.0.6099.130

在业务中,对全局的scroll事件做了监听,只要发生滚动,会模拟点击行为来关闭select下拉框,由于上述问题,反向滚动后,关闭下拉框时的位置和虚拟列表的数据不符合,发生了错位,导致有部分白屏产生

react-component/select#1023

@MadCcc MadCcc added improvement improve some features and removed unconfirmed labels Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement improve some features Inactive
Projects
None yet
Development

No branches or pull requests

2 participants