Skip to content

[Android, Windows] SearchBar with IsReadOnly=True still allows text deletion While pressing delete icon #29547

@TamilarasanSF4853

Description

@TamilarasanSF4853

Description

When setting IsReadOnly="True" on a SearchBar, the 'X' clear button remains interactive on Android and Windows, enabling users to delete the text content by tapping the 'X' button. This behavior contradicts the expected functionality of the IsReadOnly property, which should prevent any text modification including deletion via the clear button.

Screen.Recording.2025-05-16.at.5.34.22.pm.mov

Expected Behavior

The 'X' clear button should either be hidden or disabled when IsReadOnly is set to True, preventing any text deletion.

Actual Behavior

On Android, the 'X' clear button remains visible and functional, allowing users to delete the text despite the IsReadOnly property being set to True.

Steps to Reproduce

  1. Create a SearchBar with IsReadOnly="True" and initial text or download the sample project SearchBar.zip
  2. Run the app on Android and Windows
  3. Observe that the 'X' clear button is still visible and active
  4. Tap the 'X' button in the SearchBar

Link to public reproduction project repository

No response

Version with bug

9.0.70 SR7

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android, Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions