MDL-51841 forms lib: Autocomplete fields work with spaces.

This commit is contained in:
Adrian Greeve
2015-10-26 15:02:52 +08:00
parent 81c471e2a9
commit adebc069bd
2 changed files with 3 additions and 3 deletions
File diff suppressed because one or more lines are too long
+2 -2
View 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.