Skip to content

Conversation

@kuangshen04
Copy link
Contributor

The basics

The details

Resolves

Fixes #2577
The input in toolbox-search cannot focus because of the new FocusManager mechanism in Blockly v12.

Proposed Changes

Rewrite the focus logic using the interface provided by FocusManager.

Reason for Changes

Test Coverage

Documentation

Additional Information

@kuangshen04 kuangshen04 requested a review from a team as a code owner July 7, 2025 20:53
@kuangshen04 kuangshen04 requested review from cpcallen and removed request for a team July 7, 2025 20:53
@google-cla
Copy link

google-cla bot commented Jul 7, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@xXBuilderBXx
Copy link

registerShortcut on line 90 also needs fixing, it seems to select the category but not focus the input box.

@cpcallen
Copy link
Contributor

cpcallen commented Jul 9, 2025

Hi @kuangshen04 (and @xXBuilderBXx), and thanks for sending us this PR.

The changes you propose all look fairly reasonable, but found myself confused about why they should be necessary. It eems the plugin works fine with Blockly v12, so, per the reasoning I outlined in my comment on #2577 I believe the underlying issue is actually an unintentional breaking change in Blockly, and should be fixed there.

I'm going to leave this PR open for the time being, for two reasons:

  • If my colleagues can convince me that the problem is not with Blockly, or cannot be fixed there, then this fix may well be the next best alternative.
  • The change to use focus rather than selection is probably the direction we want to go anyway, so we should consider applying it anyway—but in that case I would want to consider it as a stand-alone refactor, once the underlying problem causing Toolbox search broken in Blockly v12 #2577 is fixed.

My colleagues will do triage on Friday, so I'll aim to revisit this next week.

@gonfunko gonfunko self-requested a review July 18, 2025 21:30
@gonfunko gonfunko self-assigned this Jul 18, 2025
@maribethb
Copy link
Contributor

@cpcallen I think we should merge this. The discussion about the Blockly change in #9082 shouldn't block fixing the broken plugin. Can you review (if necessary) and merge when ready?

@cpcallen
Copy link
Contributor

cpcallen commented Sep 9, 2025

Thanks for sending this fix, and apologies that it has taken so long to get it reviewed and merged!

@cpcallen cpcallen merged commit a30bb65 into google:master Sep 9, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolbox search broken in Blockly v12

5 participants