MDL-51841 forms lib: Autocomplete fields work with spaces.
authorAdrian Greeve <adrian@moodle.com>
Thu, 22 Oct 2015 03:56:28 +0000 (11:56 +0800)
committerAdrian Greeve <adrian@moodle.com>
Mon, 26 Oct 2015 07:02:52 +0000 (15:02 +0800)
lib/amd/build/form-autocomplete.min.js
lib/amd/src/form-autocomplete.js

index 7d71745..6538e7f 100644 (file)
Binary files a/lib/amd/build/form-autocomplete.min.js and b/lib/amd/build/form-autocomplete.min.js differ
index 09a0a06..7790150 100644 (file)
@@ -606,14 +606,14 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
         });
         var selectionElement = $(document.getElementById(selectionId));
         // Handle clicks on the selected items (will unselect an item).
-        selectionElement.parent().on('click', '[role=listitem]', function(e) {
+        selectionElement.on('click', '[role=listitem]', function(e) {
             // Get the item that was clicked.
             var item = $(e.currentTarget);
             // Remove it from the selection.
             deselectItem(inputId, selectionId, item, originalSelect, multiple);
         });
         // Keyboard navigation for the selection list.
-        selectionElement.parent().on('keydown', function(e) {
+        selectionElement.on('keydown', function(e) {
             switch (e.keyCode) {
                 case KEYS.DOWN:
                     // Choose the next selection item.