fix(editor): use nullable inline editor root element (#9320)

Fixes `sentry-7906c03b79a54ede819c56cc15ad9889`
This commit is contained in:
doodlewind
2024-12-26 07:55:15 +00:00
parent cb4dd127fd
commit 71b5cddea1
16 changed files with 58 additions and 21 deletions
@@ -117,7 +117,8 @@ export class AffineMobileLinkedDocMenu extends SignalWatcher(
offset = scrollTopOffset ?? 0;
}
container?.scrollTo({
if (!inlineEditor.rootElement || !container) return;
container.scrollTo({
top:
inlineEditor.rootElement.getBoundingClientRect().top +
containerScrollTop -