Skip to content

negative sign can not be deleted when prefix is more than one symbol #882

@VanemalP

Description

@VanemalP

Describe the issue and the actual behavior

  • When allowNegative is set to true and the prefix prop contains more than one symbol (e.g., "USD"), the user cannot delete the negative sign using the backspace key when there is a negative input.
  • Additionally, if only a negative sign is input, it gets removed when the input loses focus (on blur).

Describe the expected behavior

Users should be able to delete the negative sign using the backspace key.

Provide a CodeSandbox link illustrating the issue

https://codesandbox.io/p/sandbox/multi-symbol-prefix-with-negative-qvqnfh

Provide steps to reproduce this issue

  1. Open the provided CodeSandbox link
  2. Attempt to delete the value including the negative sign by pressing the backspace key.
  3. Observe that the negative sign is not deleted.
  4. Blur the input field
  5. Observe that the negative sign is removed

Please check the browsers where the issue is seen

  • Chrome
  • Chrome (Android)
  • Safari (OSX)
  • Safari (iOS)
  • Firefox
  • Firefox (Android)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions