mojira.dev
MCPE-187039

Items move to hotbar when closing inventory

It seems to only happen when hovering over a single item, and then closing the inventory, stacks of 2 or more seem unaffected
This is only true for the local inventory, on external inventories (e.g. chests) it always takes items when hovering over them

 

Steps to Reproduce:
open inventory
close inventory while hovering over item

Observed Results:
the item moves to the first available slot, if no slots are available it drops

Expected Results:
the item stays where it is

Linked issues

Attachments

Comments 15

I suggest linking a video and including steps to reproduce your issue.

No, I don't think it is, these items are completely usable, and it happens in any inventory with any item

When I'm able to get on my computer, I will try to reproduce this. In the meantime though, please include steps to reproduce this issue as mentioned in the guidelines for posting a bug report.

5 more comments

Yes, it does still occur without the resource packs.

This is related to the recent change that made Q and E work as right and left-click in JSON UI.

[media]

Here is what happens:

  1. Player presses E to close the inventory while hovering over an item

  2. Minecraft sees this as a right-click in JSON UI

  3. The hovered item is split using typical right-click behavior

  4. Half the stack is now selected by the inventory cursor

  5. The inventory closes

  6. Minecraft knows the cursor is not a valid storage slot

  7. The cursor items are moved to the first available inventory slot, which is in the hotbar

This explains why the behavior only occurs when E is used to close the inventory. This also makes the bug very easy to reproduce.

Can confirm, it behaves as expected when I disable full keyboard gameplay.
Is there a workaround? I'd like to keep using full keyboard gameplay.

This could be fixed if they made left and right click use the I and P keys instead. Those letters on the keyboard are also closest to the mouse for most players so it makes sense.

I could confirm in Android with Keyboard & Mouse connected.

JustenDouma

(Unassigned)

1340751

Community Consensus

Multiple

1.21.50.20 Preview, 1.21.30, 1.21.31 Hotfix, 1.21.51 Hotfix, 1.21.100

Retrieved