Merge branch 'MDL-69466-3.9' of https://github.com/JBThong/moodle into MOODLE_39_STABLE

This commit is contained in:
Sara Arjona
2020-09-09 11:39:30 +02:00
6 changed files with 26 additions and 6 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+18 -1
View File
@@ -36,7 +36,9 @@ function($, log, str, templates, notification, LoadingIcon) {
SPACE: 32,
ESCAPE: 27,
COMMA: 44,
UP: 38
UP: 38,
LEFT: 37,
RIGHT: 39
};
var uniqueId = Date.now();
@@ -800,10 +802,24 @@ function($, log, str, templates, notification, LoadingIcon) {
// Remove it from the selection.
pendingPromise.resolve(deselectItem(options, state, $(e.currentTarget), originalSelect));
});
// Remove the highlight of items when user tabs out the tag list.
selectionElement.on('blur', function(e) {
e.preventDefault();
$(this).children().attr('data-active-selection', false).attr('id', '');
});
// When tag list is focused, highlight the first item.
selectionElement.on('focus', function(e) {
e.preventDefault();
var element = $(this).children('[data-active-selection=true]');
if (element && element.length === 0) {
activateNextSelection(state);
}
});
// Keyboard navigation for the selection list.
selectionElement.on('keydown', function(e) {
var pendingPromise = addPendingJSPromise('form-autocomplete-keydown-' + e.keyCode);
switch (e.keyCode) {
case KEYS.RIGHT:
case KEYS.DOWN:
// We handled this event, so prevent it.
e.preventDefault();
@@ -811,6 +827,7 @@ function($, log, str, templates, notification, LoadingIcon) {
// Choose the next selection item.
pendingPromise.resolve(activateNextSelection(state));
return false;
case KEYS.LEFT:
case KEYS.UP:
// We handled this event, so prevent it.
e.preventDefault();
+2 -1
View File
@@ -333,7 +333,8 @@ fieldset.coursesearchbox label {
}
.form-autocomplete-selection:focus {
outline: none;
outline: 0;
box-shadow: $input-btn-focus-box-shadow;
}
/** Undo some bootstrap things */
.form-autocomplete-selection + input.form-control {
+2 -1
View File
@@ -16496,7 +16496,8 @@ fieldset.coursesearchbox label {
background-color: #fff; }
.form-autocomplete-selection:focus {
outline: none; }
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(17, 119, 209, 0.75); }
/** Undo some bootstrap things */
.form-autocomplete-selection + input.form-control {
+2 -1
View File
@@ -16723,7 +16723,8 @@ fieldset.coursesearchbox label {
background-color: #fff; }
.form-autocomplete-selection:focus {
outline: none; }
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(17, 119, 209, 0.75); }
/** Undo some bootstrap things */
.form-autocomplete-selection + input.form-control {