Permalink
Browse files

Merge branch 'MDL-59527-master' of git://github.com/damyon/moodle

  • Loading branch information...
dmonllao committed Jul 17, 2017
2 parents 2ce7fad + 47dd535 commit 7d04eaca5c43efe67216a681870658a77d686788
Showing with 12 additions and 5 deletions.
  1. +1 −1 lib/amd/build/form-autocomplete.min.js
  2. +11 −4 lib/amd/src/form-autocomplete.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -544,7 +544,7 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
updateAjax(e, options, state, originalSelect, ajaxHandler);
});
} else {
// Else - open the suggestions list.
// Open the suggestions list.
updateSuggestions(options, state, inputElement.val(), originalSelect);
}
}
@@ -621,11 +621,18 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
});
if (options.showSuggestions) {
var arrowElement = $(document.getElementById(state.downArrowId));
arrowElement.on('click', function() {
arrowElement.on('click', function(e) {
// Prevent the close timer, or we will open, then close the suggestions.
inputElement.focus();
// Show the suggestions list.
updateSuggestions(options, state, inputElement.val(), originalSelect);
// Handle ajax population of suggestions.
if (!inputElement.val() && options.ajax) {
require([options.ajax], function(ajaxHandler) {
updateAjax(e, options, state, originalSelect, ajaxHandler);
});
} else {
// Else - open the suggestions list.
updateSuggestions(options, state, inputElement.val(), originalSelect);
}
});
}

0 comments on commit 7d04eac

Please sign in to comment.