Preserve selected font face after focus changes#20359
Open
danyalahmed1995 wants to merge 4 commits into
Open
Conversation
Member
|
@danyalahmed1995 Thanks for working on this. Looks like there's merge conflicts with main. Once you merge main in, I'll come in and review it. 😊 |
Contributor
Author
|
Thanks man , I mistakenly fetched from origin instead of upstream 😅. Should be good now merged main into the branch and verified the build by running the build again |
carlos-zamora
approved these changes
Jun 25, 2026
carlos-zamora
left a comment
Member
There was a problem hiding this comment.
Thanks for the fix!
Verified this works locally. Also checked if this was an issue we had to worry about in the actions page (action type) but I didn't find the issue there, so we don't have to worry about it.
Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
Contributor
Author
|
Sounds good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the font face
AutoSuggestBoxresetting to its previous value, or stale filter text, after a keyboard-selected font is committed and focus later leaves the control.WinUI restores its cached user query when the suggestion list closes. The existing
LostFocuspath then treated that programmatic restoration as fresh user input and committed the stale value.This change distinguishes genuine user edits from programmatic text restoration, preserving the committed font value while retaining the queued selected-suggestion commit introduced by #20255.
Fixes #20353.
Validation
Manually validated with a local
CascadiaPackageDebug x64 build:Lucida ConsolefromConsolasusing keyboard navigation.Lucida Consolewas applied.Lucida Consoleremained selected.