-
Notifications
You must be signed in to change notification settings - Fork 0
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
Html validation of "Insert a whole number" is broken #1022
Comments
I see this bug on Firefox, and the correct behaviour on Safari. |
I see different behaviour for different FF versions (all from nixpkgs e9ca92b55bed47696cc7cc25d3f854a1e2e01f86)
And on nixpkgs da5adce0ffaff10f6d0fee72a02a5ed9d01b52fc
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code of conduct
Don't report security issues here
Is there an existing issue?
What happened?
Started a new program, and used the action "Insert a whole number". The input box will accept any garbage (e.g. "abc"), and does not complain that it is not a number. (Unlike the "Insert a character", which validates that there is only one character added.)
What should have happened?
There should be something preventing me from submitting a nonsense string where a number is expected.
Which component(s) or aspect(s) of the project are the source of the issue?
one or more React components
Developers, please provide the output of the bug report script
No response
Which browser(s) exhibit the issue, if applicable?
Firefox
On which platform(s) does your browser exhibit the issue, if applicable?
Linux
Do you have a reproducer?
No response
Any additional information?
I'm sure that this used to work, and that bit of the source (
components/ActionInput/index.tsx
) has not changed. I have probably updated my Firefox since then. The new, broken version of firefox is 116.0.Looking at the docs, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes, I do not see any problem with the regex in the attribute
pattern="[-+]?[0-9]+"
. Indeed, running a roughly-equivalent example in the browser's javascript console:new RegExp("[-+]?[0-9]+").test("-3")
works as expected.Does anyone else see this bug, and on what browsers? Could this possibly be a Firefox bug?
The text was updated successfully, but these errors were encountered: