- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.4k
TextBoxMask TextChanging fix for #3279 #4048
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
TextBoxMask TextChanging fix for #3279 #4048
Conversation
| Thanks puppetsw for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 | 
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.
Since, the text is masked, new text with different casing should be considered different than the old text.
But if we need to ignore casing, then it should be an option that a developer can set.
Let me test this and get back to you.
        
          
                Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Internals.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …Mask.Internals.cs This makes sense. We shouldn't ignore the casing. Co-authored-by: Nirmal Guru <Nirmal4G@gmail.com>
| This PR has been marked as "needs attention 👋" and awaiting a response from the team. | 
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.
👍🚀
| @puppetsw would you be up for adding a new unit test for guarding regressions as well? We have info in our wiki now about this here. There's also an existing UI Test for checking binding you could copy as well, but think it may be simpler to have a unit test for this too since you could update the binding text via code in the test as well with the  | 
| @michael-hawker Sure can do. I'll write up something shortly. Edit: I'm not sure if this was the best way to handle this I couldn't figure out a way to test this with VisualUITestBase. So I piggy-backed onto the existing TextBoxMask UI test. | 
Fixes #3279
Applies the fix suggest by oenarap in issue #3279 .
PR Type
What kind of change does this PR introduce?
What is the current behavior?
TextBoxMask leaves an artifact (i.e., old Text value) when a new value is set. (Through binding)
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
First attempt at a PR and fix. I hope I'm doing this right.