Skip to content

Commit

Permalink
fix(desktop): prevent scroll event from increasing/decreasing number
Browse files Browse the repository at this point in the history
input
  • Loading branch information
pascalbreuninger committed Jan 15, 2025
1 parent 4c75213 commit 39b7f14
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ function OptionFormField({
spellCheck={false}
placeholder={placeholder ?? `Enter ${displayName}`}
type="number"
onWheel={(e) => {
// This prevents the input field from increasing/decreasing the numbers when the scroll event is captured
// while this input field is focused
;(e.target as HTMLInputElement).blur()
}}
{...props}
/>
)
Expand Down

0 comments on commit 39b7f14

Please sign in to comment.