-
Notifications
You must be signed in to change notification settings - Fork 166
fix: after selecting and dragging text, the table still scrolls even after releasing the mouse. #328
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
base: master
Are you sure you want to change the base?
Conversation
The package version was changed from 3.19.2 to 3.19.1, possibly to correct a versioning error or revert a previous update.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough本次更改在 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Document
participant useScrollDrag
User->>Document: mousedown
Document->>useScrollDrag: 开始拖拽
User->>Document: mouseup/dragend/dragstart/blur/visibilitychange
Document->>useScrollDrag: 触发 clearDragState
useScrollDrag->>useScrollDrag: 重置拖拽状态
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/hooks/useScrollDrag.tsOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (7)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
来源 ant-design issue:ant-design/ant-design#53924
bug复现:选择文本,鼠标按住文本拖拽到表格外边,松开鼠标,鼠标上下移动会触发表格滚动。demo 稳定复现
https://github.com/user-attachments/assets/9bec2f1c-866f-40d0-be9e-b6e19b6c0be8
查看源码后定位 rc-table / rc-virtual-list;在 rc-virtual-list 的 useScrollDrag hook 当中。
Summary by CodeRabbit