From 62e482e84c2e34fa1dfe6695b12c37780cac22b1 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Tue, 1 Oct 2024 03:00:54 +0000 Subject: [PATCH] Fix jump to content (#2729) --- src/shared/components/app/app.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/components/app/app.tsx b/src/shared/components/app/app.tsx index d56b9caf..2fb3a380 100644 --- a/src/shared/components/app/app.tsx +++ b/src/shared/components/app/app.tsx @@ -16,13 +16,15 @@ import AnonymousGuard from "../common/anonymous-guard"; import AdultConsentModal from "../common/modal/adult-consent-modal"; import { destroyTippy, setupTippy } from "../../tippy"; -function handleJumpToContent(event) { +function handleJumpToContent(app: App, event: any) { event.preventDefault(); + app.contentRef.current?.focus(); } export default class App extends Component { private isoData: IsoDataOptionalSite = setIsoData(this.context); private readonly rootRef = createRef(); + readonly contentRef = createRef(); componentDidMount() { setupTippy(this.rootRef); @@ -69,7 +71,7 @@ export default class App extends Component { return ( -
+
{RouteComponent && (isAuthPath(path ?? "") ? (