Skip to content

[BUG] Number input clamps value on every keystroke, making it painful to type large values #581

@MikeTheCanuck

Description

@MikeTheCanuck

Duplicate check

  • I have searched for existing issues and confirmed this is not a duplicate.

Before submitting a bug report, I have:

  • Reviewed the documentation.
  • Ensured I am using ghcr.io/cleanuparr/cleanuparr docker repository.
  • Ensured I am using the latest version.
  • Enabled verbose logging.

What is the behavior?

When typing into any number input field, the value is clamped to the field's min/max range on every keystroke. This makes it very difficult to type values that start with a digit below the minimum.

Steps to reproduce

  1. Open Queue Cleaner → Add/Edit a Stall Rule
  2. Click into the Max Strikes field (min: 3, max: 5000)
  3. Type a value starting with a digit below the minimum — e.g. 1000 (just over 3 days)

Expected behavior
The field shows 1000 as typed.

Actual behavior
Typing 1 immediately clamps to 3 (the minimum), so continuing produces 3000 instead of 1000. Any value that starts below the minimum gets mangled on the very first keystroke.

I noticed this while setting up stall rules for the first time and trying to configure a round value like 1000 (just over 3 days). I eventually had to figure out the workaround of typing one less than my target and hitting +

Suggested fix
Move the min/max enforcement from the input event to the blur event. Free typing is allowed; clamping happens only when the user leaves the field:

onInput(event):
  if field is empty → set value to null, return
  set value = parse(field.value)   // no clamping — let them type

onBlur(event):
  clamp value to [min, max]
  update field display if value changed
  emit blur event

The existing inline error messages (e.g. "Min value is 3") already provide feedback during typing, so the user isn't left without guidance while mid-entry.

Happy to submit a PR if this approach looks good to you.

Which operating system do you use?

MacOS

What type of deployment do you use?

Docker container

Relevant log output

N/A — this is a pure UI bug with no relevant log output.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions