mojira.dev
MC-246988

Camera moves in the direction of the cursor when closing UIs on macOS

Whenever I close my inventory, chest, crafting, or menu, while moving my cursor, the camera would jump to the direction of the cursor.

To reproduce, open your inventory and close it while moving your cursor.

Edit: I've only seen this issue on Macs.

Environment

MacOS Monterey 12.1, Java 17.0.1 64 bit, M1 Macbook Air

Linked issues

Attachments

Comments 18

i cannot confirm this

I forgot to mention that I have only seen this bug on Macs.

ok but at least it didn't happen on both my windows and my mac

Can confirm on Mac (MacOS 11.6, Minecraft Java 1.18.2).

8 more comments

Also able to reproduce it. It seems that if you completely stop the mouse movement before closing inventory it doesn't happen. You have to be moving the mouse at the same time you close inventory. Video Here

Confirming still happens and is easily reproducible in 1.21.0. Doesn't always happen.

[media]

demonstrates it happening. I have mods installed but I have tested it both vanilla and with my mods and neither makes any difference to this action.

This is a GLFW issue that specifically affects Mac players. For anyone who uses Prism Launcher, here’s a fix: https://github.com/Poleward/mac-lwjgl-fix

Confirming happens in 1.21.10.

It actually snaps in the OPPOSITE direction of the mouse, as if it is snapping the mouse to the center and thus moving the camera.

I have this problem too. why its took too many years to fix this problem?

migrated

(Unassigned)

Confirmed

Platform

Important

Input

1.18.1, 1.18.2, 1.19, 1.19.4, 1.20.1, , 25w02a, 1.21.5 Pre-release 2, 1.21.9 Pre-Release 2, 1.21.10, 26.3 Snapshot 1

Retrieved