fix(core): fix falsy e2e (#6027)
This commit is contained in:
@@ -205,7 +205,8 @@ export const BlocksuiteEditorContainer = forwardRef<
|
||||
|
||||
useEffect(() => {
|
||||
if (blockElement) {
|
||||
requestIdleCallback(() => {
|
||||
affineEditorContainerProxy.updateComplete
|
||||
.then(() => {
|
||||
if (mode === 'page') {
|
||||
blockElement.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
@@ -221,9 +222,10 @@ export const BlocksuiteEditorContainer = forwardRef<
|
||||
path: blockElement.path,
|
||||
});
|
||||
selectManager.set([newSelection]);
|
||||
});
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
||||
}, [blockElement, affineEditorContainerProxy.host?.selection, mode]);
|
||||
}, [blockElement, affineEditorContainerProxy, mode]);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user