diff --git a/tgui/packages/tgui/components/Button.tsx b/tgui/packages/tgui/components/Button.tsx index 72650063125..cb7f3b0af38 100644 --- a/tgui/packages/tgui/components/Button.tsx +++ b/tgui/packages/tgui/components/Button.tsx @@ -91,8 +91,20 @@ export const Button = (props: Props) => { const toDisplay: ReactNode = content || children; + const ref = useRef(null); + + function handleButtonClick(event) { + if (!disabled && onClick) { + onClick(event); + if (ref?.current) { + (ref.current as HTMLElement).blur(); + } + } + } + let buttonContent = (