[GH-ISSUE #1737] After using Shift + Right-Click to move items in chests, it stops working and prevents interaction #526

Closed
opened 2026-11-02 15:39:46 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1737

After using Shift + Right-Click to move items in chests, it stops working and prevents interaction with inventory items.

What I did: I was transferring items from my inventory to a chest using Shift + Right-Click.

What happened: After moving a few items, the command stopped working and I could no longer interact with the items in my inventory, even after closing one chest and opening another.

The chests were double chests. I could only move items again after opening a single chest, but the command would only work for two or three items before stopping again.

What I expected: The Shift + Right-Click function should continue working consistently without stopping.

Horizon version: 0.2.50

OS, CPU, GPU: Windows x64, 11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50 GHz, Intel(R) Iris(R) Xe Graphics (128 MB)

Reported on Discord by Bragim in #horizon-bugs · Discord thread
Tags: gameplay

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @ludovic111 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1737 > After using Shift + Right-Click to move items in chests, it stops working and prevents interaction with inventory items. > > What I did: I was transferring items from my inventory to a chest using Shift + Right-Click. > > What happened: After moving a few items, the command stopped working and I could no longer interact with the items in my inventory, even after closing one chest and opening another. > > The chests were double chests. I could only move items again after opening a single chest, but the command would only work for two or three items before stopping again. > > What I expected: The Shift + Right-Click function should continue working consistently without stopping. > > Horizon version: 0.2.50 > > OS, CPU, GPU: Windows x64, 11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50 GHz, Intel(R) Iris(R) Xe Graphics (128 MB) Reported on Discord by **Bragim** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1563766723365052446) Tags: gameplay <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:39:46 +07:00
Author
Owner

@levzzz5154 commented on GitHub (Oct 26, 2026):

🤖 Agent: I could not reproduce this on main (8cf51888) — real mouse events through horizon-ctl (key shift down + click-at), single and double chests:

Case Result
Single chest, 8 Shift+Right-Click transfers, then a plain click clicks work
Double chest (54 slots), 9 Shift+Right-Click transfers on nine hotbar slots clicks work
Double chest, 12 rapid Shift+Right-Clicks on one slot clicks work
Six rapid Shift+Left-Clicks (double-click PICKUP_ALL path) clicks work
Shift+Right-Click while carrying a stack clicks work
Crafting table: Shift+Left-Click into the grid, close with Escape, reopen grid returned, clicks work

I did find and fix the one piece of state that produces exactly this symptom, though: AbstractContainerScreen keeps isQuickCrafting on the screen, Horizon keeps it on Game (inv_clicks) and never cleared it when a screen closed, so a press whose release never arrived (the pointer left the window, or the screen closed first) made Clicks::press answer None for every later press. #2052 resets it on close and on re-grab.

If you still see it, the version and whether the pointer left the window during a transfer would narrow it a lot.

<!-- gh-comment-id:6411268128 --> @levzzz5154 commented on GitHub (Oct 26, 2026): 🤖 Agent: I could not reproduce this on `main` (8cf51888) — real mouse events through `horizon-ctl` (`key shift down` + `click-at`), single and double chests: | Case | Result | | --- | --- | | Single chest, 8 Shift+Right-Click transfers, then a plain click | clicks work | | Double chest (54 slots), 9 Shift+Right-Click transfers on nine hotbar slots | clicks work | | Double chest, 12 rapid Shift+Right-Clicks on one slot | clicks work | | Six rapid Shift+Left-Clicks (double-click `PICKUP_ALL` path) | clicks work | | Shift+Right-Click while carrying a stack | clicks work | | Crafting table: Shift+Left-Click into the grid, close with Escape, reopen | grid returned, clicks work | I did find and fix the one piece of state that produces exactly this symptom, though: `AbstractContainerScreen` keeps `isQuickCrafting` on the screen, Horizon keeps it on `Game` (`inv_clicks`) and never cleared it when a screen closed, so a press whose release never arrived (the pointer left the window, or the screen closed first) made `Clicks::press` answer `None` for every later press. #2052 resets it on close and on re-grab. If you still see it, the version and whether the pointer left the window during a transfer would narrow it a lot.
Author
Owner

@rdbtCVS commented on GitHub (Oct 26, 2026):

🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. Merged #2052 resets stale container press/drag state, but its author explicitly could not reproduce the original Shift+Right-Click trigger and did not claim to close this issue. Recommend keeping this open pending a current-build reproduction, especially whether the pointer leaves the window or the screen closes during a press.

<!-- gh-comment-id:6418459150 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. Merged #2052 resets stale container press/drag state, but its author explicitly could not reproduce the original Shift+Right-Click trigger and did not claim to close this issue. Recommend keeping this open pending a current-build reproduction, especially whether the pointer leaves the window or the screen closes during a press.
Author
Owner

@levzzz5154 commented on GitHub (Oct 26, 2026):

🤖 Agent: I found the piece of state that is not reset, and opened PR #2561 for it.

The screen's press state belongs to the screen: AbstractContainerScreen keeps isQuickCrafting and the quick craft drag it belongs to as fields of the screen, so every screen starts with its own state. Horizon keeps both on Game (inv_clicks, inv_drag, last_inv_click), and until now they were only dropped when the pointer was grabbed again (#2052). A press whose release never arrived — the pointer left the window, or the screen was replaced before the release — therefore kept the drag running on the next screen: Clicks::press answers None for every later press, so the Shift quick move stopped working and the inventory stopped answering.

PR #2561 makes the press state go with the pointer: Game::capture drops it whichever way the pointer changes hands (a screen opens, a screen closes, the window loses focus), and Clicks::cancel_drag names the drop. Two tests come with it: container_screen::tests::a_lost_release_does_not_wedge_the_quick_move (the screen's click rules) and menu::tests::a_chest_quick_move_keeps_the_next_one_working (the menu's click rules: a Shift+Right-Click quick move in a double chest's 54 slots moves the stack and leaves the menu's state clean, so the next one still works).

Vanilla reference: net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.mouseClicked / mouseReleased (the screen's isQuickCrafting, quickCraftingButton and quickCraftSlots), net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.mouseClicked's quickKey (the Shift+Right-Click that sends ContainerInput.QUICK_MOVE) and net.minecraft.world.inventory.AbstractContainerMenu.quickMoveStack / moveItemStackTo (what the quick move does in a chest menu).

Self-check: cargo test -p horizon-client --lib -- container_screen::tests menu::tests::a_chest_quick_move → 7 passed, 0 failed; cargo fmt -p horizon-client → clean.

I could not reproduce the original trigger (the report is from 0.2.50, before #2052), so I am leaving this open: if it still happens, the version and whether the pointer left the window during a transfer would narrow it down.

<!-- gh-comment-id:6429475961 --> @levzzz5154 commented on GitHub (Oct 26, 2026): 🤖 Agent: I found the piece of state that is not reset, and opened PR #2561 for it. The screen's press state belongs to the screen: `AbstractContainerScreen` keeps `isQuickCrafting` and the quick craft drag it belongs to as fields of the screen, so every screen starts with its own state. Horizon keeps both on `Game` (`inv_clicks`, `inv_drag`, `last_inv_click`), and until now they were only dropped when the pointer was grabbed again (#2052). A press whose release never arrived — the pointer left the window, or the screen was replaced before the release — therefore kept the drag running on the next screen: `Clicks::press` answers `None` for every later press, so the Shift quick move stopped working and the inventory stopped answering. PR #2561 makes the press state go with the pointer: `Game::capture` drops it whichever way the pointer changes hands (a screen opens, a screen closes, the window loses focus), and `Clicks::cancel_drag` names the drop. Two tests come with it: `container_screen::tests::a_lost_release_does_not_wedge_the_quick_move` (the screen's click rules) and `menu::tests::a_chest_quick_move_keeps_the_next_one_working` (the menu's click rules: a Shift+Right-Click quick move in a double chest's 54 slots moves the stack and leaves the menu's state clean, so the next one still works). Vanilla reference: `net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.mouseClicked` / `mouseReleased` (the screen's `isQuickCrafting`, `quickCraftingButton` and `quickCraftSlots`), `net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.mouseClicked`'s `quickKey` (the Shift+Right-Click that sends `ContainerInput.QUICK_MOVE`) and `net.minecraft.world.inventory.AbstractContainerMenu.quickMoveStack` / `moveItemStackTo` (what the quick move does in a chest menu). Self-check: `cargo test -p horizon-client --lib -- container_screen::tests menu::tests::a_chest_quick_move` → 7 passed, 0 failed; `cargo fmt -p horizon-client` → clean. I could not reproduce the original trigger (the report is from 0.2.50, before #2052), so I am leaving this open: if it still happens, the version and whether the pointer left the window during a transfer would narrow it down.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#526
No description provided.