scratchfoundation / scratchfoundation/scratch-blocks

Some imputs accept negatives when they shouldn't

Open
#2,916 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Low Prevalence Low Severity priority 4
Dominant language
JavaScript
Stars
2.8k
Forks
1.6k
Avg merge
4h 51m
Merged PRs (30d)
12

Description

Expected Behavior

On all inputs that expecting a positive integer the negative symbol shouldn't be able to be typed or appear in the touch numberpad.

Actual Behavior

On some inputs expecting a positive integer (e.g. item () of ()) the negative symbol is able to be typed and appears in the touch numberpad.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Open any project on a touch screen
  2. Drag out the item () of () block
  3. Click on the number input
  4. Notice the negative button appears, negative numbers can also be typed.
System Details

Ubuntu 22.10, Firefox 107

Screenshots

image

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 project on a touch screen by opening the “item () of ()” block and focusing its number input. Trace the input and touch-numberpad handling for positive-integer fields; done means negative symbols cannot be typed or shown for those inputs, while valid positive values still work.

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
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.