diff options
Diffstat (limited to 'core/misc/autocomplete.js')
-rw-r--r-- | core/misc/autocomplete.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/misc/autocomplete.js b/core/misc/autocomplete.js index acfaf7c787e9..8b083683837d 100644 --- a/core/misc/autocomplete.js +++ b/core/misc/autocomplete.js @@ -116,7 +116,7 @@ Drupal.behaviors.autocomplete = { attach: function attach(context) { - var $autocomplete = $(context).find('input.form-autocomplete').once('autocomplete'); + var $autocomplete = $(once('autocomplete', 'input.form-autocomplete', context)); if ($autocomplete.length) { var blacklist = $autocomplete.attr('data-autocomplete-first-character-blacklist'); @@ -136,7 +136,7 @@ }, detach: function detach(context, settings, trigger) { if (trigger === 'unload') { - $(context).find('input.form-autocomplete').removeOnce('autocomplete').autocomplete('destroy'); + $(once.remove('autocomplete', 'input.form-autocomplete', context)).autocomplete('destroy'); } } }; |