The checkboxes for sprite-specific monitors don't connect to the right monitors

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start by reproducing the issue at https://scratch.mit.edu/projects/editor/ using the listed steps, checking monitor toggles while switching between the Stage and sprites. Trace the sprite-specific monitor checkbox behavior from that editor entry point; done means each checkbox toggles only the currently selected sprite's monitor once, without duplicate monitors.

Written by the indexing model from the issue text.

Description

https://scratch.mit.edu/discuss/topic/905757/

Expected Behavior

The checkboxes always toggle those monitors that show the current sprite's properties.

Actual Behavior

The checkboxes are connected to a set of monitors that depends on the sprite that was selected when the checkboxes loaded. For example if a checkbox was loaded by going from the Stage to Sprite1, and then you switch to Sprite2 and show Sprite2's monitor, then Sprite2's monitor is added to Sprite1's set. Then if you go back to the Stage, you can hide the monitor only if you first go to Sprite1

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://scratch.mit.edu/projects/editor/'
  2. Show the 'x position'
  3. Create and select a new sprite (I'll call it Sprite2)
  4. See that the 'x position' checkbox is still toggling Sprite1's monitor
  5. Show the 'y position'
  6. Go to the Stage and go back to Sprite2
  7. Click again on the 'y position' checkbox
  8. See that it now shows it two times instead of hiding the first one
  9. Go to the Stage and then go to Sprite1
  10. Click again on the 'y position' checkbox
  11. See that it now hides Sprite2's first monitor, even though Sprite1 is selected

Screenshots

https://github.com/user-attachments/assets/cb716e34-e6c7-41a9-9b85-dda47c679187

System Details

I've tried it in the online editor on Windows 10, Chrome 154

According to the forum, it also happens in Scratch Desktop (Offline Editor) v3.32.1, but it doesn't in v3.29.1

Dominant language
JavaScript
Stars
310
Forks
299
Avg merge
19h 41m
Merged PRs (30d)
14

Getting set up

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.

More from scratchfoundation/scratch-editor

All issues in scratchfoundation/scratch-editor

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.