The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.58k
stars
471
forks
source link
[Bug] [MauiCompat] unexpected behavior in mask XX:XX #1981
When using the MaskedBehavior with a mask set as "XX:XX" for an Entry control, the cursor positioning behaves unexpectedly after the third character is entered. This causes the fourth character to be inserted in the wrong position, and the resultant format becomes incorrect.
Stack Trace
N/A (Not a crash, but unexpected UI behavior)
Steps to Reproduce
Create an Entry control in XAML with the MaskedBehavior set to "XX:XX".
Type four consecutive numbers.
Observe the cursor position and the resulting text in the Entry after the third character.
Expected Behavior
The text in the Entry should format correctly to "12:34" (given the numbers "1234" as input).
Actual Behavior
After entering the third number, the cursor repositions incorrectly, and entering the fourth number results in a format like "14:23".
Description
When using the MaskedBehavior with a mask set as "XX:XX" for an Entry control, the cursor positioning behaves unexpectedly after the third character is entered. This causes the fourth character to be inserted in the wrong position, and the resultant format becomes incorrect.
Stack Trace
N/A (Not a crash, but unexpected UI behavior)
Steps to Reproduce
Expected Behavior
The text in the Entry should format correctly to "12:34" (given the numbers "1234" as input).
Actual Behavior
After entering the third number, the cursor repositions incorrectly, and entering the fourth number results in a format like "14:23".