Skip to content

Ipad toolbox bug fixes#11333

Open
srietkerk wants to merge 4 commits into
masterfrom
srietkerk/bugs/toolbox-tap
Open

Ipad toolbox bug fixes#11333
srietkerk wants to merge 4 commits into
masterfrom
srietkerk/bugs/toolbox-tap

Conversation

@srietkerk
Copy link
Copy Markdown
Contributor

Fixes microsoft/pxt-microbit#6802
Fixes microsoft/pxt-microbit#6799
Fixes microsoft/pxt-microbit#6827

With some of the new keyboard navigation features, there has been some trouble with the touch experience. This PR reverts a change that no longer checked if a toolbox category was open before setting the selection. Having that check removed was making it so the state was not set correctly and it was not possible to open a single toolbox category back to back with tap. It also adds support for a pointer up event, this fixed the bugs that were happening with the Monaco flyout.

Upload target: https://makecode.microbit.org/app/e532c5c7638ad17654a008d2ab97e2b8e2216b14-a0104c7626

@srietkerk srietkerk requested review from a team and Copilot May 27, 2026 22:23
@srietkerk srietkerk changed the title Srietkerk/bugs/toolbox tap Ipad toolbox bug fixes May 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes iPad/touch interaction regressions in the MakeCode toolbox and Monaco flyout after recent keyboard navigation changes.

Changes:

  • Restores a guard in toolbox focus handling to avoid re-selecting an already selected category.
  • Adds touch/pen pointerup handling for Monaco toolbox category selection.
  • Adds pointerup focus handling for Monaco flyout blocks when not dragging.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
webapp/src/toolbox.tsx Updates toolbox focus behavior and adds Monaco-only pointer-up category selection.
webapp/src/monacoFlyout.tsx Adds pointer-up focus behavior for flyout block taps.

ref={handleRef}
onFocus={() => this.handleFocus(qName)}
onClick={() => buttonRef && buttonRef.focus()}
onPointerUp={() => { if (!this.dragging && buttonRef) buttonRef.focus(); }}
Copy link
Copy Markdown
Member

@riknoll riknoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we should revert this focus change. instead, let's figure out why the check on line 500 isn't triggering correctly on ipad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants