Temporary fix for issue #2.#14
Merged
Merged
Conversation
Contributor
Author
|
Btw, I think there is no problem merging into the main branch - if you want to undo this temp fix, just delete the corresponding line. The original method upstream seems unlikely to be changed in the short term, so I think this should not cause problems. |
This was referenced May 8, 2025
Owner
|
merging this into a new branch, since it's specific to 0.1.0 |
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.
Bug from upstream:
As noted in issue #38829, PageViewModel.FetchProperty unconditionally raises PropertyChanged(SearchText) before the model’s SearchText is actually updated, so DynamicListPage’s default setter ends up reassigning the bound TextBox.Text prematurely—and WinUI always moves the caret to the end whenever you set Text in code .
Temporary Fix
By fully overriding SearchText and never calling base.SearchText = value, I completely bypass that race-y PropertyChanged + binding reassignment. Instead, I keep the query in our own private field and call UpdateSearchText(old, new) directly. this preserves real-time list updates while leaving the TextBox’s caret exactly where the user left it
GitHub.
Also, since it's a temp fix, I wish it could be merged to a new branch.