diff --git a/tgui/packages/tgui/components/Modal.js b/tgui/packages/tgui/components/Modal.js index 9cf990c45b..54c8c090ec 100644 --- a/tgui/packages/tgui/components/Modal.js +++ b/tgui/packages/tgui/components/Modal.js @@ -9,9 +9,20 @@ import { computeBoxClassName, computeBoxProps } from './Box'; import { Dimmer } from './Dimmer'; export const Modal = (props) => { - const { className, children, ...rest } = props; + const { className, children, onEnter, ...rest } = props; + // VOREStation Addition start + let handleKeyDown; + if (onEnter) { + handleKeyDown = (e) => { + let key = e.which || e.keyCode; + if (key === 13) { + onEnter(e); + } + }; + } + // VOREStation Addition end return ( - +
diff --git a/tgui/packages/tgui_ch/components/Modal.js b/tgui/packages/tgui_ch/components/Modal.js index 9cf990c45b..54c8c090ec 100644 --- a/tgui/packages/tgui_ch/components/Modal.js +++ b/tgui/packages/tgui_ch/components/Modal.js @@ -9,9 +9,20 @@ import { computeBoxClassName, computeBoxProps } from './Box'; import { Dimmer } from './Dimmer'; export const Modal = (props) => { - const { className, children, ...rest } = props; + const { className, children, onEnter, ...rest } = props; + // VOREStation Addition start + let handleKeyDown; + if (onEnter) { + handleKeyDown = (e) => { + let key = e.which || e.keyCode; + if (key === 13) { + onEnter(e); + } + }; + } + // VOREStation Addition end return ( - +