NumericTextBoxes and Focus

3 posts, 0 answers
  1. Steve
    Steve avatar
    1888 posts
    Member since:
    Dec 2008

    Posted 05 Apr 2012 Link to this post

    Ok so MVVM is creating my numeric textboxes...and I initalize them to 0.

    Problem though is when I tab from item to item it selects the 0 then immediatly deselects it and puts the cursor before the 0.  So that means the user has to delete the 0 instead of just starting to type in the new value

    <input id="myfood-serving-count" type="text" class="my-food-nutinfo-input count" value="1"  data-role="numerictextbox" data-bind="value: measure.size" data-min="0" />

  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 10 Apr 2012 Link to this post

    Hi Steve,

    This behaviour is not supported out of the box. As a workaround I suggest to hook up to the focus event of the corresponding inputs and select the value. Thus way the user will not need to delete the previous number.

    In this jsFiddle you can find an example using this approach in action.

    All the best,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Anton Mironov
    Anton Mironov avatar
    203 posts

    Posted 16 Sep 2020 Link to this post


    I would like to share with you that as of Kendo UI version 2020 R3, our team has added the "selectOnFocus" property covering the pointed requirements in this thread.  For your future web development, feel free to utilize this implementation shown here:


    <input id="numerictextbox" />
        selectOnFocus: true

    If you have any questions about the new functionality don't hesitate to contact us.

    Kind Regards,
    Anton Mironov
    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

Back to Top