Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6652

Improve setfocus javascript function

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 8.3.0
    • None
    • wicket-core
    • None

    Description

      I'm trying to rewrite a simple Angular app in wicket and I'm facing an issue.

      My webapp must validate the text entered by user in real time. I create a AjaxFormComponentUpdatingBehavior tirggered by keyup event. the main problem is that when wicket validates the input it refocus the component on the html placing the caret at the beggining of the field, before the already typed text. So if I Digit 'gi' as text and the text is invalid the caret of the filed is before the 'g' and not after the 'i'.  Is it possibile to have a patch or a workaround (i tried to use appendJavascript in my Behavior but with no luck).

      Thanks a lot.

       

      Giovanni

       

      Attachments

        Activity

          People

            svenmeier Sven Meier
            giovanni.cuccu Giovanni Cuccu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: