jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput Problems setting focus with focus method

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 8 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Problems setting focus with focus method #89320

    badera
    Participant

    There are two problems using focus method to give the focus to jqxNumberInput:

    1)
    The focus is given correctly, the cursor is blinking. But we cannot enter number with keyboar unless we click into the input again even though the input already has focus.
    http://jsfiddle.net/jqwidgets/uVetE/

    2)
    If we use a symbol and symbolPosition right, setting the focus will set the cursor an the right side of the symbol:
    http://jsfiddle.net/uVetE/69/

    Well, I think it is two times the same problem: The cursor is set on the right most side in the input. If we manually click there with the mouse, we can also not enter any number. (Reproduced in Chrome, Firefox. Newest Versions)
    Ideally, the cursor would be set on the left hand side of the decimal point position.
    What is the best and cleanest way to achieve this?
    Thanks in advance,
    – badera

    Problems setting focus with focus method #89330

    Peter Stoev
    Keymaster

    Hi badera,

    The focus method focuses the NumberInput. Its purpose is to set the NumberInput’s focus, not to set the caret position and it correctly puts the widget on focus when called. In Javascript, caret position is set through different API like setSelectionRange.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.