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

[BUG] MaskedBehaviour does not draw trailing format characters #2475

Open
2 tasks done
gabrieltigerstrom opened this issue Jan 27, 2025 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working unverified

Comments

@gabrieltigerstrom
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

MaskedBehavior removes all masked characters that exceed the length of the masked input string.
This means the mask E 000° 00' 00" with unmasked character 0 and the value 180 00 00 will be rendered as E 180° 00' 00 without the last quote character.

Expected Behavior

The trailing format characters should be drawn in the entry.

Steps To Reproduce

  1. Open and run solution from linked reproducible repository.
  2. Enter 1200000 without spaces

Further: try adding the last quote character after 1200000

Link to public reproduction project repository

https://github.com/gabrieltigerstrom/MCT-masked-behavior-reproducible

Environment

- .NET MAUI CommunityToolkit: 11.0.0
- OS: Microsoft Windows 10 Home (10.0.19045 Build 19045)
- .NET MAUI: 9.0.30

Anything else?

Without having done any debugging I feel like the condition on line 180 in MaskedBehavior.shared.cs is suspicious.
My understanding from reading the code is that the formatting will be applied until maximum text length is reached.

@gabrieltigerstrom gabrieltigerstrom added bug Something isn't working unverified labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

1 participant