diff --git a/src/shared/components/common/subscribe-button.tsx b/src/shared/components/common/subscribe-button.tsx index 6e2a1561..1017c3a4 100644 --- a/src/shared/components/common/subscribe-button.tsx +++ b/src/shared/components/common/subscribe-button.tsx @@ -80,11 +80,27 @@ export function SubscribeButton({ ); } +function focusInput() { + document.getElementById("remoteFetchInstance")?.focus(); +} + class RemoteFetchModal extends Component { constructor(props, context) { super(props, context); } + componentDidMount() { + document + .getElementById("remoteFetchModal") + ?.addEventListener("shown.bs.modal", focusInput); + } + + componentWillUnmount(): void { + document + .getElementById("remoteFetchModal") + ?.removeEventListener("shown.bs.modal", focusInput); + } + render() { return (