8000 Fix #2727: Only handle space key events when there is a focused widget by narenrameshb · Pull Request #2731 · pythonarcade/arcade · GitHub
[go: up one dir, main page]

Skip to content

Fix #2727: Only handle space key events when there is a focused widget #2731

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

Conversation

narenrameshb
Copy link

Fixes #2727

Changes

  • Modified UIFocusMixin to only handle space key events when there is a focused widget
  • Added checks for self.focused_widget is not None to both key press and key release handlers
  • This ensures space key events are only captured when appropriate and passed through otherwise

Testing

  • Verified that space key events are only handled when there is a focused widget
  • Confirmed that space key events are passed through when no widget is focused
  • Tested both key press and key release events

@eruvanos
Copy link
Member

Hi, thank you for looking into this.

Your changes are already covered by line 90.
I guess the issue title is misleading, I am sorry for that.
I have to doublecheck the Discord conversation.

@eruvanos eruvanos closed this Jun 15, 2025
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.

UIFocusMixin consumes Space
2 participants
0