Skip to content
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: Pressing any function key causes the selection panel to reopen. #647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zmjack
Copy link

@zmjack zmjack commented Jun 8, 2023

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 工作流程
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

ant-design/ant-design#40243

💡 需求背景和解决方案

  1. 情境:在未打开选择面板的 Picker 按下功能键(Alt / Ctrl / Win / CAPS 等),选择面板会被重新打开。
  2. 示例:选定某日期后,按 Alt+Tab 切换应用程序会导致选择面板重新被打开,影响用户操作。

📝 更新日志

更新以下按键,不响应打开选择面板的调用:

  1. F1 ~ F12
  2. Scroll Lock
  3. Pause
  4. Insert
  5. Page Up
  6. Page Down
  7. Num Center (Mac)
  8. Number Lock
  9. Ctrl
  10. Shift
  11. Alt
  12. Windows Key (left & right)
语言 更新描述
🇺🇸 英文 fix: Pressing any function key causes the selection panel to reopen.
🇨🇳 中文 修正问题:按下任意键导致选择面板重新打开。

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

🚀 概述

copilot:summary

🔍 实现细节

copilot:walkthrough

@vercel
Copy link

vercel bot commented Jun 8, 2023

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

KeyCode.SHIFT,
KeyCode.ALT,
KeyCode.META, // WIN_KEY_LEFT
KeyCode.WIN_KEY_RIGHT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zombieJ 是不是白名单就好,这样黑名单写不完,也浪费体积

@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Merging #647 (0849a54) into master (b28702b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ 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%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants