-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix SearchBar IsTextPredictionEnabled false functionality #31255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SearchBar IsTextPredictionEnabled false functionality #31255
Conversation
|
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. |
There was a problem hiding this 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 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 |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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
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