scratchfoundation / scratchfoundation/scratch-blocks
Code Block Undo event allowed to bubble causing issues
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
Actual Behavior
When you press Ctrl+Z repeatedly after placing blocks, the focus will change to the sprite name, or other input boxes and undo any changes you made there too earlier. The undo even needs to be prevented from bubbling up I suspect?
Steps to Reproduce
Steps to reproduce the behavior:
- Start a new project
- From the coding tab, Rename the sprite to "Testing"
- Now drop in a few blocks
- Press Ctrl+Z a few times
At this point the focus changes back to the sprite name after one click (at the same time as the last block disappears)
Then on the second press the 2nd block disappears, but the sprite is also renamed back to "sprite1"
And on the next press the other blocks continue to disappear.
Because the blocks do get undone... you can easily have awful things happen without realising it. Also, sprite renames across sprites can be undone causing concatenation of sprite names, and all sorts of badness!
System Details
Win 10, PC
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
Start by reproducing the behavior in a new project from the coding tab, following the listed sprite-rename and block-placement steps. Trace the Ctrl+Z handling and event propagation from the block editor; done means repeated undo removes blocks without moving focus to inputs or reverting sprite names.
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