[MIRROR] Make middle clicks work in the new alt panel (#11178)

Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-13 07:40:59 -07:00
committed by GitHub
parent a8bde62a71
commit 946406b6c8

View File

@@ -1,3 +1,4 @@
import { type MouseEvent } from 'react';
import { useBackend } from 'tgui/backend';
import { Button, Stack } from 'tgui-core/components';
import type { BooleanLike } from 'tgui-core/react';
@@ -38,14 +39,15 @@ export function LootBox(props: Props) {
p={0}
fluid
color="transparent"
onClick={(event) =>
onMouseDown={(event: MouseEvent) => {
act('grab', {
alt: event.altKey,
ctrl: event.ctrlKey,
ref: item.ref,
shift: event.shiftKey,
})
}
middle: event.button === 1,
});
}}
onContextMenu={(event) => {
event.preventDefault();
act('grab', {