Skip to content

Escape key clears search highlights in documents#11847

Merged
tommoor merged 1 commit into
mainfrom
tommoor/esc-clear-highlights
Mar 22, 2026
Merged

Escape key clears search highlights in documents#11847
tommoor merged 1 commit into
mainfrom
tommoor/esc-clear-highlights

Conversation

@tommoor

@tommoor tommoor commented Mar 22, 2026

Copy link
Copy Markdown
Member

Summary

  • When navigating to a document from search results, the search term is highlighted using the FindAndReplace extension, but since the popover isn't open there's no way to dismiss the highlights
  • Adds an Escape key binding to the FindAndReplace extension that clears active search highlights
  • Falls through to the default Escape behavior (blur editor) when no highlights are active

Test plan

  • Search for a term and click a result to navigate to the document
  • Verify the search term is highlighted on the page
  • Press Escape and verify the highlights are cleared
  • Press Escape again and verify the editor blurs as before
  • Open Find and Replace with Cmd+F, search, then close with Escape — verify highlights still clear correctly

🤖 Generated with Claude Code

When navigating to a document from search results, the search term is
highlighted via FindAndReplace but the popover is not open, so there was
no way to dismiss the highlights. This adds an Escape key binding to the
FindAndReplace extension that clears highlights when active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tommoor tommoor force-pushed the tommoor/esc-clear-highlights branch from 28714f8 to 5f071b2 Compare March 22, 2026 16:17
@tommoor tommoor merged commit ac1f68a into main Mar 22, 2026
12 checks passed
@tommoor tommoor deleted the tommoor/esc-clear-highlights branch March 22, 2026 16:21
NoWauu pushed a commit to NoWauu/outline that referenced this pull request May 12, 2026
When navigating to a document from search results, the search term is
highlighted via FindAndReplace but the popover is not open, so there was
no way to dismiss the highlights. This adds an Escape key binding to the
FindAndReplace extension that clears highlights when active.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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