-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
area-controls-searchbarSearchBar controlSearchBar controlpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androidplatform/iosplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
SearchBar.CursorPosition and SelectionLength properties don't work correctly. When the user types, they are still 0. These two properties works in Entry and Editor but not in SearchBar

Steps to Reproduce
- Clone the reproduction project https://github.com/holecekp/MauiCursorPositionBug/
- Run it on Android
- There are 3 input controls - a SearchBar, an Entry and an Editor. Type any text into the SearchBar. You can observe that the cursor moves but the SearchBar.CursorPosition is still 0.
- You can move the cursor to the beginning of the SearchBar text and press Shift+right arrow to select a part of the text. You can check that even if the selection is changed, the SearchBar.SelectionLength property is still 0.
- Try the above steps also for the Entry and Editor - it works. This bug affects the SearchBar control only.
- Run the project on Windows and repeat the above steps. You can see the same bug also on Windows (I haven't tested iOS and Mac).
Link to public reproduction project repository
https://github.com/holecekp/MauiCursorPositionBug/
Version with bug
9.0.90 SR9
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows, I was not able test on other platforms
Affected platform versions
Tested on Android 15, Windows 11, probably version of OS doesn't matter
Did you find any workaround?
No. Maybe ignroing MAUI properties and get the cursor position and the selection length from the Android control myself would be possibe in certain situations when one doesn't need databinding to these properties.
Relevant log output
Metadata
Metadata
Assignees
Labels
area-controls-searchbarSearchBar controlSearchBar controlpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androidplatform/iosplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working