Skip to content

fix(Suggestions): Focus search input when opening suggestions menu#99

Merged
lordrip merged 1 commit intoKaotoIO:1.xfrom
mmelko:feat/suggetions-button
Mar 18, 2026
Merged

fix(Suggestions): Focus search input when opening suggestions menu#99
lordrip merged 1 commit intoKaotoIO:1.xfrom
mmelko:feat/suggetions-button

Conversation

@mmelko
Copy link
Contributor

@mmelko mmelko commented Mar 18, 2026

Screen.Recording.2026-03-18.at.10.48.08.mov

Summary by CodeRabbit

  • Bug Fixes
    • Improved keyboard navigation in suggestions dropdown—focus now remains on the search input when opening via keyboard shortcuts (Ctrl+Space, Alt+Escape) or toggling suggestions, allowing for continuous typing without focus shifts.

@lordrip lordrip merged commit 7d821f1 into KaotoIO:1.x Mar 18, 2026
5 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a782d483-2b1e-423f-87ed-57fe1042bff8

📥 Commits

Reviewing files that changed from the base of the PR and between 274bba7 and b0dfdeb.

📒 Files selected for processing (1)
  • src/form/hooks/suggestions.tsx

📝 Walkthrough

Walkthrough

Changes redirect focus from the first suggestion item to the search input field in two keyboard-triggered flows within the suggestions hook. When opening suggestions via keyboard shortcuts (Ctrl+Space or Alt+Escape) or programmatically, the focus target is shifted from firstElementRef to searchInputRef. No alterations to error handling or other control logic are present.

Changes

Cohort / File(s) Summary
Suggestions Hook Focus Management
src/form/hooks/suggestions.tsx
Modified keyboard-triggered focus behavior to direct focus to the search input instead of the first suggestion item when opening/activating suggestions menu via Ctrl+Space, Alt+Escape, or programmatic invocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • lordrip

Poem

🐰 A focus shift, so small yet grand,
From suggestions deep to input's hand,
Where keystroke dances, Ctrl and Space,
Now search takes center stage and place!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants