Watermark text is not displayed on Android.
Workaround:
set the WatermarkText property in code-behind with some delay:
Device.BeginInvokeOnMainThread(() =>
{
mask.WatermarkText = "enter e-mail here";
}
System.ArgumentOutOfRangeException: Count cannot be less than zero. Parameter name: count at System.String.Remove(Int32 startIndex, Int32 count) at Telerik.XamarinForms.Input.MaskedInput.MaskParser.ConstructCandidateTextForMaskTypeRegex(String oldText, Int32 startIndex, Int32 selectionLength, String enteredText, Boolean userDeletes, Int32& insertIndex) at Telerik.XamarinForms.InputRenderer.UWP.MaskedInputFormsTextBox.CreateCandidateText(KeyRoutedEventArgs e, Int32& actualInsertIndex)
The issue can be reproduced in SDK Browser application MaskedInput/Features/Regex Mask example IP and email masks when enter symbol like ., @, etc.
Meaning, if we have Mask ="00000", when placing the caret after 3 in 1234_ and pressing 5 we will overtype 4 and the result would be 1235_.
In insert mode, the 5 to be inserted between 3 and 4, meaning 12354.
Press the delete key to make the input "1.11.2020.":
Or press the backspace key:
The ApplyMaskStarted event isn't fired.
It's not about the mask, since it's set as follows (it's not working at all, as reported in the other bug):
Mask="^[0-9]$"
RegEx mask doesn't work at all.
A very basic test mask, single digit required:
<telerikInput:RadMaskedInput x:Name="maskedInput" Mask="^[0-9]{1}$" MaskType="Regex">
Result:
Anything can be typed in.
In the ApplyMaskFinished event, e.IsAccepted == true.
On top of that, the control has problems when selecting, overtyping and inserting content.
Type something:
Select all text:
Type "1":
I'd expect the entire existing content to be deleted and new value to be "1".
Same goes for inserting a character:
Attempt to insert "4" between "3" and "5":
"5" is overtyped. Inserting doesn't work.
MaskedInput ignores VerticalOptions
For example the control ignores IsTabStop and TabIndex properties for keyboard tab navigation. It behaves differently on Android, iOS and UWP.
On Sony Xperia there is a default Xperia keyboard where the following behavior with MaskedInput is observed:
- while typing into MaskedInput input field, the cursor jumps a few positions;
- users cannot enter spaces;Provide the ability to override the default caret color of the MaskedInput control
When the mask is set to be Regex and in code the InputValue of the control is set, the validation is not triggered and the error message is visualized.
When in a TableView's ViewCell, the user has to use a touch and hold gesture on the control in order for the control to gain focus. Additionally, once the touch is released, the focus is lost. <TableView> <ViewCell> <RadMaskedInput>
Currently when regex is used and the InputValue is bound and the control is focused several placeholders are added. This is incorrect behavior. The placeholders should not be added at all in regex scenarios. =========== Workaround: Set Placeholder property to "" (empty string)
MaskedInput: [iOS] Transparent BorderStyle is not applied correctly.
As a workaround, the InputValue could be set at a later stage according to the concrete scenario.
We can consider exposing TextAlignment property that should also affect the Watermark.