picker
picker copied to clipboard
fix: Pressing any function key causes the selection panel to reopen.
🤔 这个变动的性质是?
- [ ] 新特性提交
- [x] 日常 bug 修复
- [ ] 站点、文档改进
- [ ] 演示代码改进
- [ ] 组件样式/交互改进
- [ ] TypeScript 定义更新
- [ ] 包体积优化
- [ ] 性能优化
- [ ] 功能增强
- [ ] 国际化改进
- [ ] 重构
- [ ] 代码风格优化
- [ ] 测试用例
- [ ] 分支合并
- [ ] 工作流程
- [ ] 其他改动(是关于什么的改动?)
🔗 相关 Issue
https://github.com/ant-design/ant-design/issues/40243
💡 需求背景和解决方案
- 情境:在未打开选择面板的 Picker 按下功能键(
Alt/Ctrl/Win/CAPS等),选择面板会被重新打开。 - 示例:选定某日期后,按
Alt+Tab切换应用程序会导致选择面板重新被打开,影响用户操作。
📝 更新日志
更新以下按键,不响应打开选择面板的调用:
- F1 ~ F12
- Scroll Lock
- Pause
- Insert
- Page Up
- Page Down
- Num Center (Mac)
- Number Lock
- Ctrl
- Shift
- Alt
- Windows Key (left & right)
| 语言 | 更新描述 |
|---|---|
| 🇺🇸 英文 | fix: Pressing any function key causes the selection panel to reopen. |
| 🇨🇳 中文 | 修正问题:按下任意键导致选择面板重新打开。 |
☑️ 请求合并前的自查清单
⚠️ 请自检并全部勾选全部选项。⚠️
- [x] 文档已补充或无须补充
- [x] 代码演示已提供或无须提供
- [x] TypeScript 定义已补充或无须补充
- [x] Changelog 已提供或无须提供
🚀 概述
copilot:summary
🔍 实现细节
copilot:walkthrough
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| picker | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 8, 2023 11:43pm |
Codecov Report
Merging #647 (0849a54) into master (b28702b) will increase coverage by
0.00%. The diff coverage is100.00%.
:exclamation: Current head 0849a54 differs from pull request most recent head 7c17f41. Consider uploading reports for the commit 7c17f41 to get more accurate results
@@ Coverage Diff @@
## master #647 +/- ##
=======================================
Coverage 99.20% 99.20%
=======================================
Files 52 52
Lines 2398 2399 +1
Branches 718 718
=======================================
+ Hits 2379 2380 +1
Misses 17 17
Partials 2 2
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/hooks/usePickerInput.ts | 98.73% <100.00%> (+0.01%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more