scratchfoundation / scratchfoundation/scratch-blocks

Number fields should not accept non-number characters(ex. Japanese)

Open
#1,857 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted localization needs-triage
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.

scratch3

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.

2019-01-07 17 21 20

Ref.
Scratch 2 behaves correctly. Number fields do not accept Japanese.

scratch2

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.