Skip to content

fix: prevent keyboard shortcuts from capturing input in diff commit textbox#627

Merged
matt2e merged 1 commit intomainfrom
cant-type-into-commit-textbox-in-diff
Apr 15, 2026
Merged

fix: prevent keyboard shortcuts from capturing input in diff commit textbox#627
matt2e merged 1 commit intomainfrom
cant-type-into-commit-textbox-in-diff

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented Apr 15, 2026

Summary

  • Add isContentEditable check to keyboard event handlers in DiffModal.svelte and diffKeyboard.ts so that typing in the contentEditable commit textbox is not intercepted by diff navigation shortcuts (e.g., 'a' for AI annotations, arrow keys for navigation)

Test plan

  • Open the diff modal and verify the commit textbox is typeable (all characters including 'a')
  • Verify AI annotation reveal (hold 'a') still works when focus is outside the textbox
  • Verify diff keyboard navigation still works when not focused on an input

🤖 Generated with Claude Code

…commit textbox

The commit textbox uses contentEditable, but keyboard shortcut handlers
only checked for INPUT/TEXTAREA elements. Added contentEditable checks
so 'a' and 'i' keys (and other shortcuts) don't fire while typing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners April 15, 2026 00:05
@matt2e matt2e merged commit 0c170f2 into main Apr 15, 2026
6 checks passed
@matt2e matt2e deleted the cant-type-into-commit-textbox-in-diff branch April 15, 2026 01:56
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.

1 participant