mirror of
https://github.com/zadam/trilium.git
synced 2025-11-26 02:24:23 +01:00
fix(client/attachments): full-height attachment not displayed correctly (closes #7847)
This commit is contained in:
parent
1cca15ca5d
commit
ed373107c2
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user