fix(core): viewport element not found in share page (#6453)
This commit is contained in:
@@ -118,7 +118,7 @@ export const BlocksuiteDocEditor = forwardRef<
|
|||||||
specs={specs}
|
specs={specs}
|
||||||
hasViewport={false}
|
hasViewport={false}
|
||||||
/>
|
/>
|
||||||
{docPage ? (
|
{docPage && !page.readonly ? (
|
||||||
<div
|
<div
|
||||||
className={styles.docEditorGap}
|
className={styles.docEditorGap}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import {
|
|||||||
WorkspaceManager,
|
WorkspaceManager,
|
||||||
WorkspaceScope,
|
WorkspaceScope,
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
|
import clsx from 'clsx';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import type { LoaderFunction } from 'react-router-dom';
|
import type { LoaderFunction } from 'react-router-dom';
|
||||||
import {
|
import {
|
||||||
@@ -214,7 +215,12 @@ export const Component = () => {
|
|||||||
docCollection={page.blockSuiteDoc.collection}
|
docCollection={page.blockSuiteDoc.collection}
|
||||||
/>
|
/>
|
||||||
<Scrollable.Root>
|
<Scrollable.Root>
|
||||||
<Scrollable.Viewport className={styles.editorContainer}>
|
<Scrollable.Viewport
|
||||||
|
className={clsx(
|
||||||
|
'affine-page-viewport',
|
||||||
|
styles.editorContainer
|
||||||
|
)}
|
||||||
|
>
|
||||||
<PageDetailEditor
|
<PageDetailEditor
|
||||||
isPublic
|
isPublic
|
||||||
publishMode={publishMode}
|
publishMode={publishMode}
|
||||||
|
|||||||
Reference in New Issue
Block a user