Skip to content
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

Windows SearchBar MaxLength > 0 not working properly #5669

Closed
rachelkang opened this issue Mar 30, 2022 · 2 comments · Fixed by #24919
Closed

Windows SearchBar MaxLength > 0 not working properly #5669

rachelkang opened this issue Mar 30, 2022 · 2 comments · Fixed by #24919
Assignees
Labels
area-controls-entry Entry p/2 Work that is important, but is currently not scheduled for release platform/windows 🪟 t/bug Something isn't working
Milestone

Comments

@rachelkang
Copy link
Member

Description

On Windows, the platform control AutoSuggestBox does not have a built-in property for MaxLength

Therefore, we are having some issues with getting MaxLength to fully work for SearchBar on Windows. For MaxLength > 0, any preassigned text gets truncated by our substring logic - however, it does not limit the searchbar itself and text greater than the assigned maxlength can still be inputted.

Creating an attached property (as was done with this control for IsReadOnly did not make a difference.

Steps to Reproduce

  1. Create a File > New > .NET MAUI app
  2. Add <SearchBar Text="1 SearchBar text" MaxLength="1" /> to the MainPage.xaml
  3. Deploy app to Windows machine
  4. Notice the SearchBar text only shows the first character "1"
  5. Click into the SearchBar, type more, and notice that it is possible when it shouldn't be

Version with bug

Release Candidate 1

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

all

Did you find any workaround?

A potential workaround is calling UpdateMaxLength() every time the text is updated
However, this is not ideal and is very laggy/glitchy, having the appearance of text being deleted after the fact

Relevant log output

No response

@rachelkang rachelkang added t/bug Something isn't working platform/windows 🪟 s/verified Verified / Reproducible Issue ready for Engineering Triage area-controls-entry Entry labels Mar 30, 2022
@rachelkang rachelkang added this to the 6.0.300 milestone Mar 30, 2022
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 30, 2022
@davidortinau
Copy link
Contributor

Still seeing this behavior on main (rc3).

image

@davidortinau davidortinau added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Apr 29, 2022
@Redth Redth added p/2 Work that is important, but is currently not scheduled for release and removed p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint labels May 3, 2022
@samhouts samhouts modified the milestones: 6.0.300, 6.0.300-servicing May 4, 2022
@jsuarezruiz jsuarezruiz self-assigned this May 26, 2022
@Redth Redth modified the milestones: 6.0-servicing, Backlog Aug 30, 2022
@ghost
Copy link

ghost commented Aug 30, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@samhouts samhouts removed the s/verified Verified / Reproducible Issue ready for Engineering Triage label Apr 5, 2023
@samhouts samhouts modified the milestones: Backlog, Under Consideration Jul 26, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@PureWeen PureWeen modified the milestones: Under Consideration, Backlog Aug 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-entry Entry p/2 Work that is important, but is currently not scheduled for release platform/windows 🪟 t/bug Something isn't working
Projects
None yet
7 participants