fix(core): viewport element not found in share page (#6453)

This commit is contained in:
L-Sun authored and GitHub committed 2024-04-10 15:26:22 +08:00
1 parent 939fa9cef0
commit 7d131ee9fc
2 files changed
+8 -2

No files matched your search

@@ -118,7 +118,7 @@ export const BlocksuiteDocEditor = forwardRef<
specs={specs}
hasViewport={false}
/>
{docPage ? (
{docPage && !page.readonly ? (
<div
className={styles.docEditorGap}
onClick={() => {
@@ -28,6 +28,7 @@ import {
WorkspaceManager,
WorkspaceScope,
} from '@toeverything/infra';
import clsx from 'clsx';
import { useCallback, useEffect, useState } from 'react';
import type { LoaderFunction } from 'react-router-dom';
import {
@@ -214,7 +215,12 @@ export const Component = () => {
docCollection={page.blockSuiteDoc.collection}
/>
<Scrollable.Root>
<Scrollable.Viewport className={styles.editorContainer}>
<Scrollable.Viewport
className={clsx(
'affine-page-viewport',
styles.editorContainer
)}
>
<PageDetailEditor
isPublic
publishMode={publishMode}