Skip to content

fix(web): keep font picker keyboard selection in sync - #9814

Open
asfires wants to merge 1 commit into
pingdotgg:mainfrom
asfires:upstream/font-picker-keyboard-2026-09-04
Open

fix(web): keep font picker keyboard selection in sync#9814
asfires wants to merge 1 commit into
pingdotgg:mainfrom
asfires:upstream/font-picker-keyboard-2026-09-04

Conversation

@asfires

@asfires asfires commented Sep 4, 2026

Copy link
Copy Markdown

Filtering the font picker can leave visible rows with their old indices, so the first match is not highlighted and Enter does not select it. Keep the full collection separate from the filtered list and refresh virtualized rows when filtering changes their indices.

This is limited to keyboard selection in the existing font picker. The open #7494 addresses monospace detection performance in the same component; this change addresses a separate interaction bug.

Validation: web typecheck and formatting pass; targeted lint reports only two existing effect warnings. In Chromium with installed fonts, typing “Jet” on upstream leaves both results unhighlighted and Enter leaves the picker open. With this fix, the first result highlights, arrow keys move the highlight, and Enter applies JetBrains Mono and closes the picker. No separate Electron run.

Before After
Before After

Before video

font-before.webm

After video

font-after.webm

Model: GPT-6. Harness: Codex in T3 Code.


Note

Low Risk
Settings UI interaction fix only; no auth, data, or persistence changes.

Overview
Fixes keyboard highlight and Enter selection in the font family picker when the user types a search query.

The combobox now receives the full font list as items and a search-filtered list as filteredItems, instead of using one list for both. The virtualized LegendList renders filteredItems and passes extraData={filteredItems} so row memoization refreshes when filtering changes item indices—keeping Base UI’s index-based highlight/selection aligned with what’s on screen.

Reviewed by Cursor Bugbot for commit baa063e. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix keyboard selection sync in FontFamilyPicker Combobox

The FontFamilyPicker Combobox now receives the full stable collection (default value plus all families) while the virtualized list renders only query-filtered items. Filtered items are passed as LegendList extraData so memoized rows refresh when filtering changes their indexes, and list height uses the filtered item count.

Macroscope summarized baa063e.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 4, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at baa063e

Macroscope's review found this PR approvable — This single-file change fixes keyboard highlight and Enter-selection synchronization in the existing font picker by keeping combobox indexing aligned with virtualized filtered rows. Its runtime impact is confined to this settings interaction, with no schema, persistence, deployment, security, billing, or authentication changes.

You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant