Skip to content

Conversation

@meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Dec 10, 2025

fixes #282461

Previously the code always focused selectionIndex once and only then cleared it for the never case, so the first item briefly became focused/selected. With the change, the list is populated without ever focusing an item when never is set, so nothing is preselected.

never.mov

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the first suggestion item was briefly focused even when the selection mode setting is set to never. This caused downstream listeners to incorrectly treat the first item as chosen.

Key Changes

  • Move selectionMode and noFocus computation to the beginning of showSuggestions() method
  • Remove redundant setFocus([selectionIndex]) call that was causing the brief focus
  • Keep single conditional setFocus() call that respects the noFocus flag

@meganrogge meganrogge merged commit b2cf60d into main Dec 10, 2025
33 of 34 checks passed
@meganrogge meganrogge deleted the merogge/never branch December 10, 2025 15:15
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.

selectionMode never focuses the suggest widget on first show

3 participants