Skip to content

fix: numeric input clamping and Range Fill hotkey keystroke leak - #1464

Merged
harshithmohan merged 2 commits into
masterfrom
fix/input-clamp-and-hotkey
Sep 8, 2026
Merged

harshithmohan merged 2 commits into
masterfrom
fix/input-clamp-and-hotkey

Conversation

@harshithmohan

@harshithmohan harshithmohan commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

Fixes two interaction bugs: InputSmall now clamps numeric input to both min and max (previously only max, and not for max={0}), and pressing the r hotkey no longer leaks an r into the Range Fill modal's autofocused number input. Relates to the Range Fill flow in EditReleaseInfoModal.tsx.

Changes

Fixed

  • InputSmall.tsx: honor a max bound of 0 (the old truthiness check max && ... disabled clamping for max={0})
  • InputSmall.tsx: enforce min symmetrically — the prop was passed to the input but never checked in the handler
  • InputSmall.tsx: deliver out-of-range values through a prototype-cloned event target instead of mutating the shared event.target, which previously wrote through to the real DOM input outside React's controlled-value flow
  • EditReleaseInfoModal.tsx: r hotkey now sets preventDefault: true (react-hotkeys-hook v5 only prevents default when explicitly asked), so the keystroke is no longer typed into the autofocused "Range Starting Number" input

Verification

  • pnpm lint, pnpm tscheck, pnpm test (186/186) pass

@harshithmohan
harshithmohan merged commit a715a49 into master Sep 8, 2026
3 checks passed
@harshithmohan
harshithmohan deleted the fix/input-clamp-and-hotkey branch September 8, 2026 17:19
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.

1 participant