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: Slider range exchange tooltip blink #48536
Conversation
Run & review this pull request in StackBlitz Codeflow. |
👁 Visual Regression Report for PR #48536 Passed ✅
🎊 Congrats! No visual-regression diff found. |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/rc-slider@10.5.0 |
这个不用放 feature 吗? |
size-limit report 📦
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
这是bugfix |
拖拽过程中最好 Tooltip 始终为 open={true},现在拖拽过程中一旦鼠标离开 Tooltip 会消失,这个体验也不太好。 |
是不是没点到 handle 上?Slider 有个特性是点击条会就近选择一个点。这个点是没有事件的。 |
是的,不过线上版本貌似没点到点上也不会有这个问题。 |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
@SocketSecurity ignore npm/fsevents@1.2.13 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #48536 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 744 745 +1
Lines 12883 12994 +111
Branches 3369 3399 +30
==========================================
+ Hits 12883 12994 +111 ☔ View full report in Codecov by Sentry. |
中文版模板 / Chinese template
🤔 This is a ...
🔗 Related issue link
fix #48149
💡 Background and solution
rc-slider
在拖动释放时,会将元素顺序重新排序以确保无障碍访问顺序正确。这导致松开瞬间,两个元素互换导致 Tooltip 移动到另一个元素上再消失。看了一下 mui 的实现,在越过时也会有一个小闪动。解法:useRafLock
控制状态更新,使其在拖拽结束时一段时间内处理 滑块 的动画,这样就保证了滑块本身也不会出现闪动。📝 Changelog
range
tooltip blink when drag the handle over another one.☑️ Self-Check before Merge