Skip to content

Instance resize modal submit button doesn't enable until you blur the input #2647

Open

Description

@david-crespo
2025-01-09-resize-input-blur.mp4

Activity

  1. benjaminleonard commented on Jan 9, 2025

    @benjaminleonard
    Contributor

    I believe this is due to how the react-aria number input works. It takes the value in the input and applies it on blur. Though maybe if the submit button is enabled when the input is touched it would still submit (and update the number value)?

    Edit:
    https://react-spectrum.adobe.com/react-aria/NumberField.html#value

    The onChange event is triggered whenever the number value updates. This happens when the user types a value and blurs the input, or when incrementing or decrementing the value. It does not happen as the user types because partial input may not be parseable to a valid number.

  2. david-crespo commented on Jan 9, 2025

    @david-crespo
    CollaboratorAuthor

    If it's hard to fix on the input side, I lean toward leaving the button enabled and having it refuse to submit if the values haven't changed. Might as well enable it to begin with if it's going to be enabled on touch. We could also hack something into the field's onChange to enable the button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions