react-component / input-number

React Input Number
https://input-number.vercel.app/
MIT License
313 stars 173 forks source link

fix: cursor position when formatter appends characters on empty string #652

Closed pierluigigiancola closed 2 months ago

pierluigigiancola commented 2 months ago

resolve #651

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
input-number ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2024 3:21am
afc163 commented 2 months ago

Could you add a test case for that?

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.28%. Comparing base (98b6025) to head (de85dc0). Report is 7 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #652 +/- ## ========================================== + Coverage 94.52% 95.28% +0.76% ========================================== Files 6 6 Lines 292 297 +5 Branches 76 78 +2 ========================================== + Hits 276 283 +7 + Misses 16 14 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pierluigigiancola commented 2 months ago

I revert the fix, add the test case to see it failed and then reapply the fix. If you want clearer git history I can close di PR, rewrite the history and issue a new one with test as first commit and fix as second

Let me know if I should add other tests