Открыть боковую панель
Teknokomo
universo-react
Коммиты
a9be19ce
Не подтверждена
Коммит
a9be19ce
создал
Мар 04, 2024
по автору
EYHN
Просмотр файлов
fix(core): fix style break when scroll to block (#6001)
владелец
d935cf9d
Изменения
2
Скрыть пробелы
Построчно
Рядом
packages/frontend/component/src/components/workspace/index.css.ts
Просмотр файла @
a9be19ce
...
@@ -50,6 +50,7 @@ export const mainContainerStyle = style({
...
@@ -50,6 +50,7 @@ export const mainContainerStyle = style({
width
:
0
,
width
:
0
,
display
:
'
flex
'
,
display
:
'
flex
'
,
flex
:
1
,
flex
:
1
,
overflow
:
'
hidden
'
,
maxWidth
:
'
100%
'
,
maxWidth
:
'
100%
'
,
selectors
:
{
selectors
:
{
'
&[data-show-padding="true"]
'
:
{
'
&[data-show-padding="true"]
'
:
{
...
...
packages/frontend/core/src/components/blocksuite/block-suite-editor/blocksuite-editor-container.tsx
Просмотр файла @
a9be19ce
...
@@ -206,11 +206,13 @@ export const BlocksuiteEditorContainer = forwardRef<
...
@@ -206,11 +206,13 @@ export const BlocksuiteEditorContainer = forwardRef<
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
blockElement
)
{
if
(
blockElement
)
{
requestIdleCallback
(()
=>
{
requestIdleCallback
(()
=>
{
blockElement
.
scrollIntoView
({
if
(
mode
===
'
page
'
)
{
behavior
:
'
smooth
'
,
blockElement
.
scrollIntoView
({
block
:
'
center
'
,
behavior
:
'
smooth
'
,
inline
:
'
center
'
,
block
:
'
center
'
,
});
inline
:
'
center
'
,
});
}
const
selectManager
=
affineEditorContainerProxy
.
host
?.
selection
;
const
selectManager
=
affineEditorContainerProxy
.
host
?.
selection
;
if
(
!
blockElement
.
path
.
length
||
!
selectManager
)
{
if
(
!
blockElement
.
path
.
length
||
!
selectManager
)
{
return
;
return
;
...
@@ -221,7 +223,7 @@ export const BlocksuiteEditorContainer = forwardRef<
...
@@ -221,7 +223,7 @@ export const BlocksuiteEditorContainer = forwardRef<
selectManager
.
set
([
newSelection
]);
selectManager
.
set
([
newSelection
]);
});
});
}
}
},
[
blockElement
,
affineEditorContainerProxy
.
host
?.
selection
]);
},
[
blockElement
,
affineEditorContainerProxy
.
host
?.
selection
,
mode
]);
return
(
return
(
<
div
<
div
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать