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

fix: Listen for keyboard shortcuts when the widget or dropdown divs have focus. #8731

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

gonfunko
Copy link
Contributor

The basics

The details

Resolves

Fixes #8725

Proposed Changes

This PR adds keydown listeners for the widget and dropdown divs and runs those events through the shortcut infrastructure. This allows keyboard shortcuts (e.g. esc, delete, copy/paste) to operate when a menu/dropdown is focused.

@gonfunko gonfunko requested a review from a team as a code owner January 13, 2025 20:13
@gonfunko gonfunko requested a review from cpcallen January 13, 2025 20:13
@github-actions github-actions bot added the PR: fix Fixes a bug label Jan 13, 2025
Copy link
Collaborator

@rachel-fenichel rachel-fenichel left a comment

Choose a reason for hiding this comment

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

LGTM. I took a look at onKeyDown to confirm that it handles cases where there are multiple workspaces; I think it does, because it calls getMainWorkspace and should get the mostly recently modified/interacted with workspace.

@gonfunko gonfunko merged commit f9ef785 into google:develop Jan 14, 2025
11 checks passed
@mikeharv
Copy link
Contributor

Thank you for the quick fix! Could you all let us know when this will make its way into a new release? Code.org will be hanging out on 11.1.1 in the meantime.

gonfunko added a commit that referenced this pull request Jan 15, 2025
@gonfunko
Copy link
Contributor Author

Sure thing! This is included in the just-released 11.2.1.

@gonfunko gonfunko deleted the key-events branch January 16, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[11.2.0] Keyboard shortcuts aren't handled correctly when a field editor is open
4 participants