Skip to content

Fix escape key handling in overlays (fixes #1348) #1353

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

workinprogr3ss
Copy link

@workinprogr3ss workinprogr3ss commented Jun 19, 2025

Summary

  • Fixes issue where the escape key wasn't working to close the help menu and other overlays
  • Adds isActive: true to useInput hook in all overlay components to ensure proper keyboard event capture
  • Prevents input events from being intercepted by background components when overlays are displayed

Changes

  • Modified help-overlay.tsx, history-overlay.tsx, diff-overlay.tsx, and model-overlay.tsx to add isActive: true option to their useInput hooks
  • Added comprehensive test suite for help overlay keyboard handling

Test Plan

  • Added unit tests for help overlay keyboard interactions
  • All existing tests pass
  • Manually tested escape key functionality in all overlays

Fixes #1348

- Add isActive: true to useInput hook in all overlay components
- Ensures overlays properly capture keyboard input when displayed
- Prevents input events from being intercepted by background components
- Add comprehensive test suite for help overlay keyboard handling

This fixes the issue where the escape key wasn't working to close the help menu.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link

github-actions bot commented Jun 19, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@workinprogr3ss
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jun 19, 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.

escape does not work to exit help menu
1 participant