-
-
Notifications
You must be signed in to change notification settings - Fork 49.2k
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: Switch trigger motion #24254
Merged
Merged
fix: Switch trigger motion #24254
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## master #24254 +/- ##
=======================================
Coverage 98.81% 98.81%
=======================================
Files 363 363
Lines 7280 7281 +1
Branches 2006 2015 +9
=======================================
+ Hits 7194 7195 +1
Misses 86 86
Continue to review full report at Codecov.
|
afc163
approved these changes
May 18, 2020
17 tasks
1 task
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.
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
resolve #19915
resolve #24087
💡 Background and solution
把 Switch 的 handle 做成一个元素,让 loadingIcon 放里面免得还要额外处理对齐问题。现在实际元素总是和容器尺寸对齐,点击宽度变化通过内部渲染元素改变。
Preview
https://preview-24254-ant-design.surge.sh/components/switch-cn/
📝 Changelog
autoFocus
trigger whendisabled
removed. Adjust style to avoid switch shaking. Remove blur logic whenonMouseUp
to improve acessibility.autoFocus
在disabled
移除后会触发的问题。调整样式以避免切换时额外的抖动。移除鼠标点击失焦逻辑以提升无障碍体验。☑️ Self Check before Merge