# Deprecation & upcoming removal of jQuery-based autocomplete

**URL:** https://meta.discourse.org/t/deprecation-upcoming-removal-of-jquery-based-autocomplete/385527
**Category:** Development
**Tags:** dev-news
**Created:** [14 oktober 2025 om 10:04 UTC](https://meta.discourse.org/t/deprecation-upcoming-removal-of-jquery-based-autocomplete/385527 "2025-10-14T10:04:36Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![kelv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kelv/32/524739_2.png) [@kelv](https://meta.discourse.org/u/kelv)
#### Post date: [14 oktober 2025 om 10:04 UTC](https://meta.discourse.org/t/deprecation-upcoming-removal-of-jquery-based-autocomplete/385527/1 "2025-10-14T10:04:36Z")

</div>

The jQuery-based autocomplete library called via the `$.autocomplete()` function is now **deprecated** in Discourse core. We’re moving toward modern solutions that provide better performance & positioning abstractions for autocomplete functionality.

## Migration Guide

### For textarea autocomplete (e.g., mentions, hashtags, emoji)

Use the **`DAutocomplete` modifier** introduced in [https://github.com/discourse/discourse/pull/33513](https://github.com/discourse/discourse/pull/33513).

The modifier provides the same functionality as the jQuery plugin but with better integration into Ember’s reactivity system and our FloatKit positioning library.

Other reference PRs: [DEV: floatkit autocomplete for ai-bot-conversations by tyb-talks · Pull Request #34354 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/34354)

**Before:**

```javascript
$(textarea).autocomplete({
  key: "@",
  dataSource: (term) => searchUsers(term),
  template: userTemplate,
  transformComplete: (user) => user.username
});

```

**After:**

```javascript
import DAutocompleteModifier from "discourse/modifiers/d-autocomplete";

// programmatically:
DAutocompleteModifier.setupAutocomplete(
  owner,
  textareaElement,
  autocompleteHandler,
  {
    key: "@",
    dataSource: (term) => searchUsers(term),
    template: userTemplate,
    transformComplete: (user) => user.username
  }
);

```

### For input field autocomplete (e.g., group/user selection)

Use the **`DMultiSelect` component** as demonstrated in [UX: overhaul of GroupSelector with Floatkit by tyb-talks · Pull Request #34685 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/34685).

This component provides a complete multi-select experience with search and selection management. The implementation in the reference PR also accommodates for a single-select mode.

**Before:**

```javascript
$("input.group-selector").autocomplete({
  dataSource: (term) => searchGroups(term),
  template: groupTemplate
});

```

**After:**

```gjs
import DMultiSelect from "discourse/components/d-multi-select";

<DMultiSelect
  @selection={{this.selectedGroups}}
  @loadFn={{this.searchGroups}}
  @onChange={{this.handleChange}}
  @label="Select groups"
>
  <:selection as |group|>
    {{group.name}}
  </:selection>
  <:result as |group|>
    {{group.name}}
  </:result>
</DMultiSelect>

```

If you maintain a theme or plugin using the jQuery autocomplete, please migrate to the new solutions. We will be resolving the deprecation on **10 November 2025**.

Reply below if you have questions about migrating your code.

---

_[View the full topic](https://meta.discourse.org/t/deprecation-upcoming-removal-of-jquery-based-autocomplete/385527)._
