Repository navigation
fix(markdown): return focus to editor from find bar - #23175
Conversation
|
This run was cancelled 🛑 The workflow was cancelled before completion. Please check the link below for details. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughFor primary-button clicks whose target is an Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This is a small, targeted fix that restores editor focus after clicking document content while the find bar is open, without altering layout or other behavior. No merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |

ELI5
Clicking back into a Markdown document while Find is open now reliably returns typing focus to the editor.
What Changed
The rich Markdown editor explicitly blurs the Find input and focuses the ProseMirror editor when the user left-clicks document content. The Find bar stays open, while subsequent typing goes into the document.
Why
Issue #22693 is reproducible in Markdown files on Windows with a physical keyboard. The existing search bar kept focus in some native mouse paths, causing keystrokes to activate Find controls instead of editing the document.
Linked Issue
Fixes #22693
Visual Proof
N/A — focus behavior is covered by the editor interaction change; no layout or visual styling changed.
Testing
ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/editor/useRichMarkdownSearch.test.tsx src/renderer/src/components/editor/RichMarkdownSearchBar.ime-enter.test.tsxpnpm tc:webpnpm exec oxlint src/renderer/src/components/editor/RichMarkdownEditorSurface.tsx