Skip to content

fix: Improve fallback for getInitialCandidate#9941

Open
microbit-robert wants to merge 2 commits into
RaspberryPiFoundation:v13from
microbit-robert:candidate-fallback
Open

fix: Improve fallback for getInitialCandidate#9941
microbit-robert wants to merge 2 commits into
RaspberryPiFoundation:v13from
microbit-robert:candidate-fallback

Conversation

@microbit-robert
Copy link
Copy Markdown
Collaborator

The basics

The details

Resolves

This PR improves the getInitialCandidate fallback to the nearest parent block that has a compatible connection. This handles the case where a nested value block (e.g. a number input) has passive focus but the dragged block (inserted via keyboard from the flyout) is a statement block that should be inserted after the containing statement block.

This PR would benefit from thorough review and testing to ensure that there aren't any unintended consequences.

Fixes #9899

Test Coverage

None

Documentation

No

Additional Information

N/A

@microbit-robert microbit-robert requested a review from a team as a code owner May 27, 2026 13:06
@microbit-robert microbit-robert requested a review from maribethb May 27, 2026 13:06
@github-actions github-actions Bot added the PR: fix Fixes a bug label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants