···1616import { PageOptions } from "./PageOptions";
1717import { CardThemeProvider } from "components/ThemeManager/ThemeProvider";
1818import { useDrawerOpen } from "app/lish/[did]/[publication]/[rkey]/Interactions/InteractionDrawer";
1919+import { usePreserveScroll } from "src/hooks/usePreserveScroll";
19202021export function Page(props: {
2122 entityID: string;
···8384 pageType: "canvas" | "doc";
8485 drawerOpen: boolean | undefined;
8586}) => {
8787+ let { ref } = usePreserveScroll(props.id);
8688 return (
8789 // this div wraps the contents AND the page options.
8890 // it needs to be its own div because this container does NOT scroll, and therefore doesn't clip the absolutely positioned pageOptions
···9597 it needs to be a separate div so that the user can scroll from anywhere on the page if there isn't a card border
9698 */}
9799 <div
100100+ ref={ref}
98101 onClick={props.onClickAction}
99102 id={props.id}
100103 className={`