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

AutoCompleteBehavior: Selected input not modiefied when selected with keyboard

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.6
    • 1.3.7
    • wicket-extensions
    • None

    Description

      AbstractAutoCompleteRenderer.getOnSelectJavascriptExpression(Object) allows to eval some JS code in order to modify the selected input (see Javadoc). However, this method is applied differently for values selected by mouse clicks (as expected) or keyboard (wrong). When selected using the keyboard, any changes are ignored.

      The keyboard related code should be changed from:

      if(handleSelection(value)) {
      obj.value = value;
      if(typeof objonchange=="function") objonchange(event);
      }

      to

      if(value = handleSelection(value)) {
      obj.value = value;
      if(typeof objonchange=="function") objonchange(event);
      }

      Attachments

        1. wicket-autocomplete.js.diff
          0.5 kB
          Stefan Fussenegger

        Activity

          People

            ivaynberg Igor Vaynberg
            sfussenegger Stefan Fussenegger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified