mojira.dev
MC-309336

Any mouse button can be used to select and apply command autocomplete suggestions

When the command autocomplete suggestion list is visible in the chat screen, side mouse buttons (Mouse 2, 3, 4, and 5) can select and immediately apply a suggestion, despite not being bound to any in-game functions.

Steps to reproduce:

  1. Open the chat screen (default: T)

  2. Type a partial command such as "/gamemode " to trigger the autocomplete suggestion list

  3. Hover the mouse cursor over one of the suggestions

  4. Click with Mouse 2, 3, 4, or 5

  5. The suggestion is selected and immediately inserted into the input field

Expected behaviour:
Only Mouse 1 (left click) should be able to select autocomplete suggestions.

Actual behaviour:
Mouse 2, 3, 4, and 5 select and apply the hovered suggestion, filling it into the chat input field.

Additional notes:
This bug is distinct from the pattern seen in MC-297502. Rather than simply missing a button validation check, the mouse button information is actively discarded: CommandSuggestions.mouseClicked passes only the cursor coordinates (not the button) to the internal SuggestionsList handler, which then selects and applies the suggestion unconditionally.

See also: MC-297502 (side mouse buttons bypass button validation in specific GUI handlers)

Comments 0

No comments.

Luo LiLing

bl4ckscor3

Confirmed

Platform

Low

Input

26.2, 26.3 Snapshot 1

26.4 Snapshot 4

Retrieved