Update to Drupal 8.2.4. For more information, see https://www.drupal.org/project/drupal/releases/8.2.4
This commit is contained in:
parent
0a95b8440e
commit
8544b60b39
284 changed files with 12980 additions and 3199 deletions
|
|
@ -77,6 +77,11 @@
|
|||
*/
|
||||
function searchHandler(event) {
|
||||
var options = autocomplete.options;
|
||||
|
||||
if (options.isComposing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var term = autocomplete.extractLastTerm(event.target.value);
|
||||
// Abort search if the first character is in firstCharacterBlacklist.
|
||||
if (term.length > 0 && options.firstCharacterBlacklist.indexOf(term[0]) !== -1) {
|
||||
|
|
@ -225,6 +230,14 @@
|
|||
.each(function () {
|
||||
$(this).data('ui-autocomplete')._renderItem = autocomplete.options.renderItem;
|
||||
});
|
||||
|
||||
// Use CompositionEvent to handle IME inputs. It requests remote server on "compositionend" event only.
|
||||
$autocomplete.on('compositionstart.autocomplete', function () {
|
||||
autocomplete.options.isComposing = true;
|
||||
});
|
||||
$autocomplete.on('compositionend.autocomplete', function () {
|
||||
autocomplete.options.isComposing = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
detach: function (context, settings, trigger) {
|
||||
|
|
@ -261,7 +274,9 @@
|
|||
renderItem: renderItem,
|
||||
minLength: 1,
|
||||
// Custom options, used by Drupal.autocomplete.
|
||||
firstCharacterBlacklist: ''
|
||||
firstCharacterBlacklist: '',
|
||||
// Custom options, indicate IME usage status.
|
||||
isComposing: false
|
||||
},
|
||||
ajax: {
|
||||
dataType: 'json'
|
||||
|
|
|
|||
Reference in a new issue