scratchfoundation / scratchfoundation/scratch-blocks
Loop insertion marker can't move from "around" to "previous" and vice-versa
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
If you drag a pants block over another block, then try to drag it left so that it's before the other block, the insertion marker won't move until you drag away and return. This is nothing severe but slightly clunky.

dragging left with the issue
The expected behaviour can be achieved by patching updatePreviews to recognise an insertion marker as invalid if localConnection has changed, not just if highlightedConnection has changed.

expected behaviour
I tried to fix this with #252, which caused #263, so I reverted the change.
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 tracing updatePreviews, then reproduce dragging a block across another block from "around" to "previous" and back. Review the history and regressions in #252 and #263 before changing behavior. Done means the insertion marker updates immediately when localConnection changes, without dragging away and returning.
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