Skip to content

fix!: Flyout follows toolbox in DOM#9849

Merged
mikeharv merged 1 commit into
RaspberryPiFoundation:v13from
mikeharv:dom-order
May 11, 2026
Merged

fix!: Flyout follows toolbox in DOM#9849
mikeharv merged 1 commit into
RaspberryPiFoundation:v13from
mikeharv:dom-order

Conversation

@mikeharv
Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #9796

Proposed Changes

This change ensures that flyout appears in the DOM directly before the workspace in order to aid in tab navigation.

Reason for Changes

As reported by @microbit-robert:

When tabbing from the toolbox, the workspace takes focus. In the previous implementation, tabbing from the toolbox focused the flyout (or the first item in the flyout to be exact).
When tabbing from the flyout, whatever comes after the blockly injection div takes focus (the workspace is skipped, that includes the trashcan and zoom controls). In the previous implementation, tabbing from the flyout focused the workspace. This feels particularly confusing and it's easy to get lost.

Test Coverage

A new test ensures that the toolbox, flyout, and workspace are all contained in the injection div in the correct order. The ordering is relative rather than absolute in order to permit flexibility with other children, such as scrollbars.

BREAKING CHANGE

This change may affect you if you application relies on the specific child order of elements in the Blockly injective div.

Previously the DOM structure was:

  1. toolbox
  2. workspace
  3. flyout

It is now:

  1. toolbox
  2. flyout
  3. workspace

@mikeharv mikeharv requested a review from a team as a code owner May 11, 2026 18:45
@mikeharv mikeharv requested a review from lizschwab May 11, 2026 18:45
@github-actions github-actions Bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug labels May 11, 2026
@mikeharv mikeharv merged commit ae055a4 into RaspberryPiFoundation:v13 May 11, 2026
9 checks passed
@mikeharv mikeharv deleted the dom-order branch May 11, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants