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

Incorrect browser validation message for number inputs #11851

Closed
colin-grant-work opened this issue Nov 8, 2022 · 0 comments · Fixed by #11927 · May be fixed by EstFoisy/theia#9
Closed

Incorrect browser validation message for number inputs #11851

colin-grant-work opened this issue Nov 8, 2022 · 0 comments · Fixed by #11927 · May be fixed by EstFoisy/theia#9
Labels
good first issue good first issues for new contributors preferences issues related to preferences ui/ux issues related to user interface / user experience

Comments

@colin-grant-work
Copy link
Contributor

Bug Description:

For any preference number input, including those that should accept floats, a validation failure message is shown by the browser itself if a float is enterede:

image

Steps to Reproduce:

  1. Enter a float in any field expecting a number.
  2. Hover over the input.
  3. Observe that the message above is shown.

The number input is created here. There, the type is set to number and no step is set. By default, that means that the step is 1, and fractional values will be treated as invalid by the browser.

One solution is to just add .step = 'any'. A more sophisticated solution would check whether the intended type of the input is integer or not and then set the step value approppriately.

Additional Information

  • Operating System: Windows 10 / RHEL7
  • Theia Version: 6b14f04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue good first issues for new contributors preferences issues related to preferences ui/ux issues related to user interface / user experience
Projects
None yet
1 participant