scratchfoundation / scratchfoundation/scratch-blocks
Number fields should not accept non-number characters(ex. Japanese)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
Expected Behavior
Number fields should not accept non-number characters like Japanese.
Changing the background color of number fields to red is good UI(see how "point in direction" block behaves in the gif animation) because the user will notice that he/she made mistype.
Actual Behavior
Number fields of any block except "point in direction" accept non-number characters like Japanese.

This is especially bad if user input full-width number(https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) because it is hard to notice the error.
Ref.
Scratch 2 behaves correctly. Number fields do not accept Japanese.

Steps to Reproduce
- Place any block that has number input field like "move steps" or "turn degrees".
- Input Japanese characters in the input field.
Operating System and Browser
Mac OS 10.14.2 Chrome 71.0.3578.98
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in a number input field using Japanese or full-width digits, comparing blocks such as “move steps,” “turn degrees,” and “point in direction.” Trace the number-field behavior from those block inputs and verify that invalid characters are rejected or visibly marked consistently when the fix is complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100