Merge branch 'MDL-53349-31' of https://github.com/xow/moodle into MOODLE_31_STABLE
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -33,7 +33,7 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
|
||||
ENTER: 13,
|
||||
SPACE: 32,
|
||||
ESCAPE: 27,
|
||||
COMMA: 188,
|
||||
COMMA: 44,
|
||||
UP: 38
|
||||
};
|
||||
|
||||
@@ -544,14 +544,6 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
|
||||
// We handled this event, so prevent it.
|
||||
e.preventDefault();
|
||||
return false;
|
||||
case KEYS.COMMA:
|
||||
if (options.tags) {
|
||||
// If we are allowing tags, comma should create a tag (or enter).
|
||||
createItem(options, state, originalSelect);
|
||||
}
|
||||
// We handled this event, so prevent it.
|
||||
e.preventDefault();
|
||||
return false;
|
||||
case KEYS.UP:
|
||||
// Choose the previous active item.
|
||||
activatePreviousItem(state);
|
||||
@@ -582,6 +574,19 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
|
||||
}
|
||||
return true;
|
||||
});
|
||||
// Support multi lingual COMMA keycode (44).
|
||||
inputElement.on('keypress', function(e) {
|
||||
if (e.keyCode === KEYS.COMMA) {
|
||||
if (options.tags) {
|
||||
// If we are allowing tags, comma should create a tag (or enter).
|
||||
createItem(options, state, originalSelect);
|
||||
}
|
||||
// We handled this event, so prevent it.
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
// Handler used to force set the value from behat.
|
||||
inputElement.on('behat:set-value', function() {
|
||||
var suggestionsElement = $(document.getElementById(state.suggestionsId));
|
||||
|
||||
Reference in New Issue
Block a user