Skip to content

fix: allow Tab to reach visible find controls when collapsed#326238

Open
cipheraxat wants to merge 1 commit into
microsoft:mainfrom
cipheraxat:fix/280340-find-tab-collapsed-controls
Open

fix: allow Tab to reach visible find controls when collapsed#326238
cipheraxat wants to merge 1 commit into
microsoft:mainfrom
cipheraxat:fix/280340-find-tab-collapsed-controls

Conversation

@cipheraxat

Copy link
Copy Markdown
Contributor

Summary

  • Tab from Find/Replace no longer always targets the case-sensitive toggle
  • When find option toggles (or prev/next) are display: none under .collapsed-find-widget, focus advances to the next visible enabled control (Find in Selection / Close)
  • Same visibility check applied to preserve-case → actions and Close → Replace paths

Fixes #280340

Root cause

Custom Tab handlers always called focusOnCaseSensitive() and preventDefault(). In the collapsed (narrow / non-maximized) layout those toggles are hidden, so Tab appeared to do nothing — especially painful with a screen reader.

Test plan

  • Unit routing: expanded → caseSensitive; collapsed → selection; selection disabled → close
  • Narrow the window until Find shows .collapsed-find-widget
  • Ctrl/Cmd+F, press Tab — focus moves to Find in Selection or Close
  • Ctrl/Cmd+H, Tab from replace — same, does not trap
  • Maximize / widen — Tab still reaches case / whole-word / regex toggles
  • Screen reader: Tab announces a real control after the find input
Skip display:none toggles/buttons on Tab so focus moves to the next
visible enabled control (selection/close) instead of trapping on hidden
case-sensitive toggles in the collapsed find widget.

Fixes microsoft#280340
Copilot AI review requested due to automatic review settings July 16, 2026 21:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes keyboard focus trapping in collapsed editor Find/Replace widgets.

Changes:

  • Skips hidden or disabled controls during Tab navigation.
  • Routes focus to the next visible action or back to the editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants