Skip to content

Commit

Permalink
fix(core): viewport element not found in share page (#6453)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Sun committed Apr 10, 2024
1 parent 939fa9c commit 7d131ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const BlocksuiteDocEditor = forwardRef<
specs={specs}
hasViewport={false}
/>
{docPage ? (
{docPage && !page.readonly ? (
<div
className={styles.docEditorGap}
onClick={() => {
Expand Down
8 changes: 7 additions & 1 deletion packages/frontend/core/src/pages/share/share-detail-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 7d131ee

Please sign in to comment.