Fix SearchBar IsTextPredictionEnabled false functionality#31255
Merged
jfversluis merged 10 commits intodotnet:inflight/currentfrom Aug 27, 2025
Merged
Fix SearchBar IsTextPredictionEnabled false functionality#31255jfversluis merged 10 commits intodotnet:inflight/currentfrom
jfversluis merged 10 commits intodotnet:inflight/currentfrom
Conversation
Contributor
|
Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where the SearchBar's IsTextPredictionEnabled property was not functioning correctly. The issue was that the ITextInput interface implementation was hardcoded to always return true, ignoring the actual property value set by developers.
- Fixed the ITextInput.IsTextPredictionEnabled implementation to return the actual property value
- Added comprehensive test coverage for the SearchBar IsTextPredictionEnabled functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Controls/src/Core/SearchBar/SearchBar.cs | Fixed ITextInput.IsTextPredictionEnabled to return actual property value instead of hardcoded true |
| src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.cs | Added test method to verify IsTextPredictionEnabled property initializes correctly for SearchBar |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
approved these changes
Aug 26, 2025
jfversluis
approved these changes
Aug 27, 2025
PureWeen
pushed a commit
that referenced
this pull request
Sep 8, 2025
fix the text prediction issue for android Removed unwanted codes remove unwanted codes simplified the fix Added test case Remove ui test Added a device test
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
Setting IsTextPredictionEnabled=false on SearchBar doesn't disable text prediction on iOS and android platforms.
Text suggestions still appear when typing, despite the property being explicitly set to false.
Root Cause
The ITextInput.IsTextPredictionEnabled interface implementation in SearchBar was hardcoded to true instead of respecting the actual property value, preventing text prediction from being disabled.
Description of Change
Modified the implementation to return the actual IsTextPredictionEnabled property value, allowing platform handlers to correctly apply text prediction settings when the property is set to false.
Validated the behavior in the following platforms
Issues Fixed
Fixes #30961
Output ScreenShot
30961-Before.mov
30961.mov