Skip to content

Create variable closes flyout if non-default dialog implementation is used #424

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

Open
microbit-matt-hillsdon opened this issue Apr 11, 2025 · 0 comments
Assignees

Comments

@microbit-matt-hillsdon
Copy link
Contributor

At some point we fixed the plugin so creating a variable correctly leaves the flyout open.

However, we didn't account for the significant difference in behaviour between window.prompt and custom dialog implementations. It's still broken for the latter because custom dialogs take actual browser focus.

For custom dialogs, focus will need to move to the dialog for input and return to the flyout afterwards. In the meantime we'll need to know to keep the flyout open. Blockly will have to be responsible for at least the latter part and it might be prudent to do restoring focus too rather than trust the dialog implementation.

It might be good to add a test scenario that plugs in some simple <dialog>-based dialogs.

Potentially relevant to @BenHenning's focus work.

CC @microbit-robert

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

No branches or pull requests

2 participants