I am getting the following Exception when I:
Trace stack of the error:
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'pPIYHdNTGKpuLp_f48NvOZyLpp6b2uJIdLYu2ndwIlc'.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
at Telerik.Blazor.Components.TelerikNumericTextBoxBase`1.Dispose()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
At the moment, the selection behavior of the NumericTextBox can vary depending on the Format - the Format is what is shown when the input does not have focus, and the Decimals control the actual number the user will see when they focus. Of both differ (for example, the Format has more decimal places, or some other information like a unit of measurement), the input value changes on focus, which removes the selection (highglight).
I would like the numeric textbox to always select all its content when it gets focused (either with the Tab key, or with a click).
Note on general input behavior - using Tab to focus in a field usually defaults to all the contents being selected, while a click results in a cursor without selection.
When running as Spanish (es) the control correctly shows commas as the decimal separator but see below. The control seems pretty broken when running under Spanish.
1) When I focus into the text box above that started off bound to a value I am unable to change the value by typing more numbers. I should be able to put my cursor in front of "33,300" and type "4" it should result in "433,300". Instead, nothing happens when I type "4". If I delete ",300" from the end the control then allows numeric entry.
2) If I delete the full number and type in a new one I am unable to enter "." or ",". Those keys are being ignored.
Create a variable like below and bind the numeric text box to it:
decimal? myNumber = 9;
decimal? MyNumber
{
get { return this.myNumber; }
set { this.myNumber = value; }
}
Put a breakpoint on the setter, run the application, and clear out the text box. The breakpoint will never be hit. If you enter a numeric value the breakpoint will be hit. The problem appears to only be with clearing the text box.