Skip to content

Commit

Permalink
Merge pull request #9735 from neinteractiveliterature/disable-scroll-…
Browse files Browse the repository at this point in the history
…restoration

Disable ScrollRestoration because it's breaking hash links
  • Loading branch information
nbudin authored Oct 30, 2024
2 parents 0dd54bb + b3741ff commit 330c960
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/javascript/AppRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Suspense, useMemo, useState, useEffect, useContext, RefObject, useRef } from 'react';
import { useLocation, useNavigate, useLoaderData, Outlet, ScrollRestoration, useNavigation } from 'react-router-dom';
import { useLocation, useNavigate, useLoaderData, Outlet, useNavigation } from 'react-router-dom';
import { Settings } from 'luxon';
import { PageLoadingIndicator } from '@neinteractiveliterature/litform';

Expand Down Expand Up @@ -125,7 +125,8 @@ function AppRoot(): JSX.Element {
>
<PageLoadingIndicator visible={navigation.state === 'loading'} />
</div>
<ScrollRestoration />
{/* Disabling ScrollRestoration for now because it's breaking hash links within the same page (reproducible with Mac Chrome) */}
{/* <ScrollRestoration /> */}
<Suspense fallback={<PageLoadingIndicator visible iconSet="bootstrap-icons" />}>
<Outlet />
</Suspense>
Expand Down

0 comments on commit 330c960

Please sign in to comment.