fix(components): [rate] avoid capturing focus when disabled#23589
Conversation
📝 WalkthroughWalkthroughThe rate component now sets tabindex dynamically based on Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. 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. Comment |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/components/rate/src/rate.vue (1)
276-303:⚠️ Potential issue | 🟠 MajorDisabled state can still update value via keyboard.
With the disabled guard removed, the slider can still change value if it remains focused when disabled or is focused programmatically. Reintroduce the guard to prevent updates while disabled.
✅ Suggested fix
function handleKey(e: KeyboardEvent) { + if (rateDisabled.value) { + return + } const code = getEventCode(e) const step = props.allowHalf ? 0.5 : 1 let _currentValue = currentValue.value
|
🧪 Playground Preview: https://element-plus.run/?pr=23589 |
|
@snowbitx Thanks for your contribution! ❤️ |

Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.Refer to this PR
Summary by CodeRabbit