scratchfoundation / scratchfoundation/scratch-editor

Point in direction block stuck to pointer after using angle picker and deleting

Open
#547 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

spork
Dominant language
JavaScript
Stars
281
Forks
276
Avg merge
7d 8h
Merged PRs (30d)
6

Description

Expected Behavior

Blocks should conveniently not become permanently attached to your cursor. As I write this, it is hard to see my screen because I now have hundreds of blocks stuck to my cursor (just kidding).

Actual Behavior

The point in direction block can become stuck to your mouse cursor after using the angle picker and then attempting to delete the block.

Steps to Reproduce

  • Drag the "point in direction" block onto the workspace
  • Click the angle input field to open the angle picker
  • Drag the angle picker to change the value
  • Click outside to close the angle picker
  • Drag the block back to the blocks menu
  • It is now stuck to you forever, maybe give it a name and think about what you will need to feed it
  • Also note that there is an error in the console (Uncaught TypeError: Cannot read properties of undefined (reading '2'))

System Details

Mac OS 26.2 Chrome 147.0.7727.56

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

Start by reproducing the issue in the block editor with the point in direction block, angle picker, and blocks menu. Use the reported console error, "Cannot read properties of undefined (reading '2')", as the first debugging entry point while tracing angle-picker cleanup and block deletion. Done means the block is removed normally, does not remain attached to the pointer, and the error no longer appears.

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
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.