Completed
Last Updated: 18 Jan 2023 12:54 by ADMIN
Release 5.0.0
Hannes
Created on: 30 Sep 2022 08:07
Category: UI for .NET MAUI
Type: Bug Report
0
NumericInput: [Android] Exception and wrong cursor position when typing dot in English (South Africa)

I am using the SDKBrowser app to demonstrate the problem. This does not happen on the emulator but on my physical device (Samsung S22). I have created a video and attached it.

When I enter a value into the Numeric input and click on the "." button, the entry does create a "," sign. This is fine but the cursor jumps back in front of the comma. I have to physically move the cursor back and can only then continue entering the decimal values.

The second problem is, if I accidently click the "." a second time after entering the decimal values, the app crashes.

 

I suspected it could be the language settings on the device. I am from South Africa and change the language of the device from English (South Africa) to English (United States) and then it works as expected. Regardless of this, I would expect the control to work with any culture.

1 comment
ADMIN
Georgi
Posted on: 30 Sep 2022 14:24

Hi Hannes,

Thanks to your detailed information I was able to reproduce the issue and here is the exception with stacktrace for visibility:

Java.Lang.IndexOutOfBoundsException
Message=setSpan (4 ... 4) ends beyond length 3

in Android.Runtime.JNIEnv.monodroid_debugger_unhandled_exception C#
in Android.Runtime.JNINativeWrapper._unhandled_exception at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:12,5 C#
in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:23,26 C#
in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw C#
in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod at /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12324,5 C#
in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod at /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:35,5 C#
in Android.Widget.EditText.SetSelection at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net6.0/android-31/mcw/Android.Widget.EditText.cs:238,5 C#
in Telerik.Maui.InputElement.RadEditText.UpdateState C#
in Telerik.Maui.InputElement.RadEditText.Telerik.Maui.InputElement.IRadEditText.UpdateState C#

in Telerik.Maui.InputElement.TextChangeProcessor.OnTextChangedMaybe C#
in Telerik.Maui.InputElement.TextChangeProcessor.OnEndBatchEdit C#
in Telerik.Maui.InputElement.RadEditText.OnEndBatchEdit C#
in Android.Widget.TextView.n_OnEndBatchEdit at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net6.0/android-31/mcw/Android.Widget.TextView.cs:5192,4 C#
in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:22,5 C#

 

Regards,
Georgi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.