Unplanned
Last Updated: 16 Oct 2026 15:05 by ADMIN
David
Created on: 21 Dec 2020 14:44
Category: MaskedTextBox
Type: Bug Report
2
Selection does not collapse properly on typing the first symbol, only after the second

My users use Tab to focus the masked textbox and when they start typing (its content was highlighted because of getting focus with Tab), that typing action does not put the range (caret) in the correct place - it remains at position 0 rather than going to position 1.

For example, in the below phone mask they type "9" and then "0" and I would expect to get "90" but I get "0".

---

ADMIN EDIT

A workaround is to collapse the range when the input gets focus:

@inject IJSRuntime JsInterop

<input />
<span @onfocusin="@CollapseInputSelection" @ref="@ParentElem">
    <TelerikMaskedTextBox Mask="+1 (000) 000-0000"
                          IncludeLiterals="true"
                          @bind-Value="@CellPhoneNumber"
                          Class="form-control" />
</span>

@* move this script to an actual script file instead of using this hack *@
<script suppress-error="BL9992">
    function collapseInputSelection(root) {
        setTimeout(function () {
            var input = root.querySelector("input");
            if (input) {
                input.setSelectionRange(0, 0);
            }
        }, 20);
    }
</script>

@code{
    string CellPhoneNumber { get; set; }

    ElementReference ParentElem { get; set; }
    async Task CollapseInputSelection()
    {
        await JsInterop.InvokeVoidAsync("collapseInputSelection", ParentElem);
    }
}

---

2 comments
ADMIN
Dimo
Posted on: 16 Oct 2026 15:05

Hello,

Following a recent review, we've decided to reopen this item.

While it has received limited community interest over the years, we believe it addresses a valid scenario and is worth keeping active. We encourage everyone interested in this request to vote for it and share additional details about their specific use case to help us better understand its relevance and demand.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Petar Mladenov
Posted on: 06 Jan 2026 15:46

Hi,

This behavior was originally reported over X years ago and has not received significant demand or follow-up from the community since then. This is why we plan to prioritize more impactful and widely requested improvements.

If this limitation is still affecting your scenario, please share additional context or use cases. This will help us better assess the severity and reconsider prioritization in the future. Thank you!

Regards,
Petar Mladenov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.