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

HTML input placeholder text breaks AutoCompleteTextField in IE11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.20.0
    • 6.21.0, 7.1.0
    • wicket-extensions
    • None
    • Windows 8.1 + Internet Explorer 11

    Description

      Reproduction steps are provided below:

      1. Configure an AutoCompleteTextField so that the suggestion list shows on focus gain, and shows even if the input is still empty.
      2. Link the AutoCompleteTextField to an HTML input element that has a value assigned to its "placeholder" attribute.
      3. Embed the AutoCompleteTextField on a webpage, and open the webpage in Internet Explorer 11.
      4. Click on the HTML input so that it receives focus. Do not enter any text.
      5. Click on an item from the AutoComplete dropdown list. Observe that nothing happens.

      Opening the console reveals that an error has occurred in the "getSelectedValue()" function in the "wicket-autocomplete.js" file. The error is caused by the fact that the variable "selected" has a value of "-1", which causes the "getSelectableElement(selected)" call to go wrong and return "undefined".

      I have recreated the issue in a Quickstart.

      Attachments

        1. quickstart.zip
          43 kB
          Remy Kaufmann

        Issue Links

          Activity

            People

              svenmeier Sven Meier
              RaKauf Remy Kaufmann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: