diff --git a/apps/client/src/widgets/scroll_padding.tsx b/apps/client/src/widgets/scroll_padding.tsx index d8452e301..4ebb7f42d 100644 --- a/apps/client/src/widgets/scroll_padding.tsx +++ b/apps/client/src/widgets/scroll_padding.tsx @@ -2,10 +2,10 @@ import { useEffect, useRef, useState } from "preact/hooks"; import { useNoteContext } from "./react/hooks"; export default function ScrollPadding() { - const { note, parentComponent, ntxId } = useNoteContext(); + const { note, parentComponent, ntxId, viewScope } = useNoteContext(); const ref = useRef(null); const [height, setHeight] = useState(10); - const isEnabled = ["text", "code"].includes(note?.type ?? ""); + const isEnabled = ["text", "code"].includes(note?.type ?? "") && viewScope?.viewMode === "default"; const refreshHeight = () => { if (!ref.current) return;