Merge branch 'MDL-51964-master' of git://github.com/damyon/moodle
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -693,7 +693,17 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
|
||||
// Whenever the input field changes, update the suggestion list.
|
||||
inputElement.on('input', function(e) {
|
||||
var query = $(e.currentTarget).val();
|
||||
updateSuggestions(query, inputId, suggestionsId, originalSelect, multiple, tags, caseSensitive);
|
||||
var last = $(e.currentTarget).data('last-value');
|
||||
if (typeof last === 'undefined') {
|
||||
last = query;
|
||||
}
|
||||
// IE11 fires many more input events than required - even when the value has not changed.
|
||||
// We need to only do this for real value changed events or the suggestions will be
|
||||
// unclickable on IE11 (because they will be rebuilt before the click event fires).
|
||||
if (last != query) {
|
||||
updateSuggestions(query, inputId, suggestionsId, originalSelect, multiple, tags, caseSensitive);
|
||||
$(e.currentTarget).data('last-value', query);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user