Skip to content

Guard shortcuts during text composition - #656

Open
DhruvShah-Dev wants to merge 4 commits into
TabularisDB:mainfrom
DhruvShah-Dev:fix/focus-shortcuts-composition
Open

Guard shortcuts during text composition#656
DhruvShah-Dev wants to merge 4 commits into
TabularisDB:mainfrom
DhruvShah-Dev:fix/focus-shortcuts-composition

Conversation

@DhruvShah-Dev

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared guard for IME/dead-key keyboard events.
  • Skip global shortcut handling while text composition is active.
  • Skip Monaco shortcut interception during composition so typed characters are left to the editor/input.

Why

Issue #655 reports intermittent focus/selection disruption while typing, possibly around alternate-character input. Composition/dead-key events can look like shortcut keydown events before the final character is committed, so shortcut handlers should not consume them.

Fixes #655.

Validation

  • pnpm.cmd exec vitest run tests/hooks/useGlobalShortcuts.test.ts tests/components/ui/SqlEditorWrapper.test.tsx
  • pnpm.cmd typecheck
  • pnpm.cmd lint

@DhruvShah-Dev
DhruvShah-Dev marked this pull request as ready for review August 17, 2026 17:15
@kilo-code-bot

kilo-code-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files)
  • src/utils/keyboardEvents.ts
  • src/hooks/useGlobalShortcuts.ts
  • src/components/ui/SqlEditorWrapper.tsx
  • tests/components/ui/SqlEditorWrapper.test.tsx
  • tests/hooks/useGlobalShortcuts.test.ts

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.

[Bug]: Focus stealing when typing

2 participants