Skip to content

Fix decimal separator handling with fixedDecimalScale#17

Merged
47vigen merged 1 commit intomainfrom
claude/review-and-release-patch-kecLk
Apr 5, 2026
Merged

Fix decimal separator handling with fixedDecimalScale#17
47vigen merged 1 commit intomainfrom
claude/review-and-release-patch-kecLk

Conversation

@47vigen
Copy link
Copy Markdown
Owner

@47vigen 47vigen commented Apr 5, 2026

Summary

Fixes an issue where typing the decimal separator when fixedDecimalScale is enabled (e.g., displaying "1.00") would insert a duplicate separator, invalidating the value and clearing the field on blur.

The fix ensures that when the decimal separator key is pressed and one already exists in the input, the cursor jumps to just after the existing decimal point instead of inserting a duplicate. This enables the standard financial input pattern: "1.00" → type "." → cursor moves after "." → type "5" → "1.50".

The behavior is locale-aware: only the locale's own decimal separator triggers the cursor jump (e.g., "," in de-DE), so the grouping separator is unaffected.

Checklist

  • Tests added or updated for new behavior
  • pnpm test passes locally
  • pnpm typecheck passes (0 errors)
  • pnpm lint passes (Biome)
  • Changeset added (pnpm changeset) for any user-facing changes
  • Docs updated if the public API changed
  • Stories added/updated in Storybook for UI changes

Related issues

Closes #

https://claude.ai/code/session_01JTrExiikywjtpc5NMCmMQf

Patch release fixing the decimal jump UX bug — typing the decimal
separator when one already exists now moves the cursor past it instead
of inserting a duplicate that clears the field on blur.

https://claude.ai/code/session_01JTrExiikywjtpc5NMCmMQf
@47vigen 47vigen merged commit f74459b into main Apr 5, 2026
13 checks passed
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