microsoft / microsoft/pxt-microbit

Fields in 'plot' can be detached but not reattached

Open
#6,573 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

keyboard navigation P2
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug

If you have a 'plot x,y' block you can detach it with the shortcut key 'x'. Pressing 'undo' moves it back to approximately the original position but does not reconnect it. Ctrl+C to copy it claims success, but you can't paste it back in the original connection. Once detached, you can't actually delete it at all.

To Reproduce

  1. New project
  2. Turn on keyboard controls
  3. Add 'plot x,y' block
  4. Edit x and y fields to whatever numbers (optional - same behaviour either way)
  5. Press 'x' to detach
  6. Press Ctrl+Z to undo
  7. OBSERVE: it moves back but doesn't reconnect
  8. Use arrows to select the orphaned block and Ctrl+C
  9. Use arrows and Ctrl+V to try to paste it back
  10. OBSERVE: you can't put it back
  11. Use arrows and Del to try to delete it
  12. OBSERVE: you can't delete it

Expected behavior

You should either not be able to detach it, or should be able to undo the operation and copy/paste it.

Screenshots

Image

micro:bit version (please complete the following information):
not relevant

Desktop (please complete the following information):

  • OS: win 11
  • Browser: Chrome and Firefox

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 a new project with keyboard controls enabled, following the listed detach, undo, copy/paste, and delete steps. Trace the editor entry points handling the 'plot x,y' block and these keyboard operations; done means the block can either not be detached or can be reconnected, copied, pasted, and deleted after detaching.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.