[PR #9789] fix(web): validation of number input fields #12641

Closed
opened 2026-02-05 15:00:42 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/immich-app/immich/pull/9789

State: closed
Merged: Yes


#9470 tried to prevent number inputs from changing empty fields to zero while the user is still changing the value. This was done by validating on:blur instead of on:input, but there are certain cases where on:blur won't fire (scrolling, using arrows, submitting form) and validation won't happen.

This issue is resolved by using on:change, which triggers only after the user has finished typing a number and also fires when the value was changed using other input methods.

With number validation fixed, adding type="submit" to the save button enables submitting admin settings using the enter key.

**Original Pull Request:** https://github.com/immich-app/immich/pull/9789 **State:** closed **Merged:** Yes --- #9470 tried to prevent number inputs from changing empty fields to zero while the user is still changing the value. This was done by validating on:blur instead of on:input, but there are certain cases where on:blur won't fire (scrolling, using arrows, submitting form) and validation won't happen. This issue is resolved by using `on:change`, which triggers only after the user has finished typing a number and also fires when the value was changed using other input methods. With number validation fixed, adding `type="submit"` to the save button enables submitting admin settings using the enter key.
OVERLORD added the pull-request label 2026-02-05 15:00:42 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#12641