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

View File

@@ -321,6 +321,9 @@ export class AtMenuConfigService extends Service {
close();
const getRect = () => {
if (!inlineEditor.rootElement) {
return { x: 0, y: 0, width: 0, height: 0 };
}
let rect = inlineEditor.getNativeRange()?.getBoundingClientRect();
if (!rect || rect.width === 0 || rect.height === 0) {