Skip to content

Pressing Enter submits the first suggestion instead of the typed query #1196

@Honoka55

Description

@Honoka55

Describe the Bug

When the search box shows autocomplete suggestions, pressing Enter takes the user to the first suggested result, rather than searching for the exact text typed in the input field, even if the typed text is a full and valid page title. This behavior differs from the default MediaWiki search box, which prioritizes the user’s actual input.

Comparison with vector-2022:

_2025_11_23_10_26_36_997.mp4

Steps to reproduce the behavior:

  1. Open the citizen search box.
  2. Type only part of a page title until autocomplete suggestions appear.
  3. Continue typing until the full and exact page title is completed and press Enter.
  4. You are taken to the first autocomplete suggestion instead of the fully typed page title.

Expected Behavior

Pressing Enter should perform a search (or go directly to the exact title) based on the user’s final typed text, not the top autocomplete suggestion. This should match the behavior of the default MediaWiki search box.

System

Please complete the following information:

  • MediaWiki version 1.44.2
  • Server OS: Debian 12
  • Installed extensions and versions Special:Version
  • PHP version 8.2.29 (fpm-fcgi)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions