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: make sure that the onChange event is triggered after onKeyDown #399

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GiveMeACoke
Copy link

⚠️ InputNumber完全受控在Safari浏览器中切换到中文输入法后输入数字时,onChange事件会先于onKeyDown事件触发,导致提前触发precision格式化

🤖 Safari版本:15.1 (17612.2.9.1.20)

复现地址(使用Safari浏览器打开,输入法切换到中文拼音模式):
https://stackblitz.com/edit/react-ts-ca5gfn

@vercel
Copy link

vercel bot commented Mar 1, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/input-number/VQ4ztdrLA8BaHHPgB1s3NYqEEg6T
✅ Preview: https://input-number-git-fork-givemeacoke-master-react-component.vercel.app

@GiveMeACoke GiveMeACoke changed the title fix: mack sure that the onChange event is triggered after onKeyDown fix: make sure that the onChange event is triggered after onKeyDown Mar 1, 2022
@ruoqianfengshao
Copy link

Is this pr can be merged?

@afc163 afc163 requested a review from zombieJ March 31, 2022 06:34
@codecov
Copy link

codecov bot commented Mar 31, 2022

Codecov Report

Merging #399 (f7d3483) into master (d3de147) will decrease coverage by 1.24%.
The diff coverage is 50.00%.

❗ Current head f7d3483 differs from pull request most recent head 1cc328d. Consider uploading reports for the commit 1cc328d to get more accurate results

@@            Coverage Diff             @@
##           master     #399      +/-   ##
==========================================
- Coverage   97.76%   96.52%   -1.25%     
==========================================
  Files           9        9              
  Lines         448      460      +12     
  Branches      116      118       +2     
==========================================
+ Hits          438      444       +6     
- Misses         10       16       +6     
Impacted Files Coverage Δ
src/InputNumber.tsx 95.50% <50.00%> (-2.91%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@ruoqianfengshao
Copy link

@zombieJ Is there any block for code review? We will fix code if it has any un-standard code immediately. Thanks~

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