Открыть боковую панель
Teknokomo
universo-react
Коммиты
dce3b59c
Не подтверждена
Коммит
dce3b59c
создал
Мар 05, 2024
по автору
EYHN
Просмотр файлов
fix(core): fix falsy e2e (#6027)
владелец
5d8dea08
Изменения
1
Скрыть пробелы
Построчно
Рядом
packages/frontend/core/src/components/blocksuite/block-suite-editor/blocksuite-editor-container.tsx
Просмотр файла @
dce3b59c
...
@@ -205,25 +205,27 @@ export const BlocksuiteEditorContainer = forwardRef<
...
@@ -205,25 +205,27 @@ export const BlocksuiteEditorContainer = forwardRef<
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
blockElement
)
{
if
(
blockElement
)
{
requestIdleCallback
(()
=>
{
affineEditorContainerProxy
.
updateComplete
if
(
mode
===
'
page
'
)
{
.
then
(()
=>
{
blockElement
.
scrollIntoView
({
if
(
mode
===
'
page
'
)
{
behavior
:
'
smooth
'
,
blockElement
.
scrollIntoView
({
block
:
'
center
'
,
behavior
:
'
smooth
'
,
inline
:
'
center
'
,
block
:
'
center
'
,
inline
:
'
center
'
,
});
}
const
selectManager
=
affineEditorContainerProxy
.
host
?.
selection
;
if
(
!
blockElement
.
path
.
length
||
!
selectManager
)
{
return
;
}
const
newSelection
=
selectManager
.
create
(
'
block
'
,
{
path
:
blockElement
.
path
,
});
});
}
selectManager
.
set
([
newSelection
]);
const
selectManager
=
affineEditorContainerProxy
.
host
?.
selection
;
})
if
(
!
blockElement
.
path
.
length
||
!
selectManager
)
{
.
catch
(
console
.
error
);
return
;
}
const
newSelection
=
selectManager
.
create
(
'
block
'
,
{
path
:
blockElement
.
path
,
});
selectManager
.
set
([
newSelection
]);
});
}
}
},
[
blockElement
,
affineEditorContainerProxy
.
host
?.
selection
,
mode
]);
},
[
blockElement
,
affineEditorContainerProxy
,
mode
]);
return
(
return
(
<
div
<
div
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать