Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number Input can not be Empty #443

Open
peetzweg opened this issue Mar 20, 2023 · 4 comments
Open

Number Input can not be Empty #443

peetzweg opened this issue Mar 20, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@peetzweg
Copy link
Collaborator

Describe the bug
The default value of a number input during contract interaction can not be removed. It seems the there always needs a value to be present. See demo down below.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://contracts-ui.substrate.io/
  2. Use a contract with a message which requieres a number parameter
  3. Try to erase the default value of 0 with a backspace

Expected behavior
I'm able to clear the default input value with a backspace to enter the number I want. Currently I have to move the caret to the start to remove the zero once I've entered the desired amount.

Screenshots

demo

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser Firefox
  • Version 112.0b3 (64-bit)

Environment (please complete the following information where it makes sense):

I've used a PSP34 contract generated using the wizard on https://openbrush.io/ .

@peetzweg peetzweg added the bug Something isn't working label Mar 20, 2023
@peetzweg
Copy link
Collaborator Author

@statictype can you confirm this is unintended behavior?

@statictype
Copy link
Contributor

this normal behaviour for the html number input. if we don't want it we need to change to type="text"

@peetzweg
Copy link
Collaborator Author

peetzweg commented May 5, 2023

Ah okay, this could be it. I find it quite awkward behaviour. Should we fix this than?

@gaboesquivel
Copy link
Contributor

@statictype should we close this ?

@peetzweg peetzweg added enhancement New feature or request and removed bug Something isn't working labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants