mojira.dev
MC-297822

Exiting a dialog by clicking a button causes any items currently being held in the cursor slot to be thrown into the world

When a dialog is shown while the player is holding an item stack in the cursor slot while in a GUI, if the player exits the dialog by clicking a button, the items in the cursor slot will be thrown into the world, potentially exposing them to danger. Exiting the dialog with the escape key does not do this, nor does navigating to the button with the arrow keys and pressing the enter key.

To reproduce

  1. Place an impulse command block with the command dialog show @p minecraft:custom_options

  2. Connect it to a pressure plate with several (6-8) 4-tick redstone repeaters

  3. Ensure that an item stack is in your hotbar

  4. Step on the pressure plate, then quickly open your inventory and pick up the item stack with your cursor

  5. When the dialog appears, click Back
    ❌ The item stack is thrown into the world

  6. Repeat steps 3-4, but this time, close the dialog with the escape key
    ✅ The items remain in your cursor slot

Attachments

Comments 0

No comments.

clamlol

boq

Confirmed

Platform

Normal

UI

25w20a

Retrieved