Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error to console when handling enter on a label in a flyout #150

Open
microbit-matt-hillsdon opened this issue Jan 15, 2025 · 1 comment

Comments

@microbit-matt-hillsdon
Copy link
Contributor

If you add content of kind=label to a toolbox category then the keyboard navigation will visit it and pressing enter on it will cause an error on the console.

bundle.js:2 Uncaught Error: No callback function found for flyout button.
    at Ht.triggerButtonCallback (bundle.js:2:1888927)
    at Object.callback (bundle.js:2:1899298)
    at Fp.onKeyDown (bundle.js:2:1476389)
    at ai (bundle.js:2:1142398)
    at HTMLDocument.s (bundle.js:2:1068151)

There's an example label in the subcategory on this deployment.

Image

I think the typescript type might be missing the kind=label case.

MakeCode uses labels as headings and subheadings in its toolbox flyouts.

@cpcallen
Copy link
Contributor

Hi @microbit-matt-hillsdon. It turns out (and I only learned this very recently) that toolbox labels are actually buttons, which is why there's no type for the kind=label case.

It definitely shouldn't be throwing, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants