Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53379

Auto complete unreliable with Ajax and only one result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:
    • Affected Branches:
      MOODLE_31_STABLE

      Description

      1. Use an auto complete that only relies on Ajax results, and does not allow multiple items
      2. Your first search result should return only 1 element, this is important. E.g. type "X" where only one items matches X.

      Expected

      • The X item shows in the suggestions

      Actual

      • The X item does not show up

      The auto complete code uses the property selected of the option tags to determine whether or not the item is currently selected. But, as the select only contains 1 element, the browse flags it as selected.

      Problem 2

      Submitting the form will submit the X item without the user's knowledge!

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: