fix(client/attachments): full-height attachment not displayed correctly (closes #7847)

This commit is contained in:
Elian Doran 2025-11-23 21:46:04 +02:00
parent 1cca15ca5d
commit ed373107c2
No known key found for this signature in database

View File

@ -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<HTMLDivElement>(null);
const [height, setHeight] = useState<number>(10);
const isEnabled = ["text", "code"].includes(note?.type ?? "");
const isEnabled = ["text", "code"].includes(note?.type ?? "") && viewScope?.viewMode === "default";
const refreshHeight = () => {
if (!ref.current) return;