diff --git a/inception/inception-js-api/src/main/ts/src/util/OffsetUtils.ts b/inception/inception-js-api/src/main/ts/src/util/OffsetUtils.ts index 3b28cfa19d0..543d83e6786 100644 --- a/inception/inception-js-api/src/main/ts/src/util/OffsetUtils.ts +++ b/inception/inception-js-api/src/main/ts/src/util/OffsetUtils.ts @@ -19,10 +19,10 @@ export function caretRangeFromPoint (clientX: number, clientY: number) : Range | null { const range = document.createRange() - // @ts-expect-error + // @ts-ignore if (document.caretPositionFromPoint) { // Use CSSOM-proprietary caretPositionFromPoint method - // @ts-expect-error + // @ts-ignore const caretPosition = document.caretPositionFromPoint(clientX, clientY) if (!caretPosition) { console.error(`Unable to determine caret position from point: ${clientX},${clientY}`) diff --git a/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts b/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts index 9dcc60edbfd..f17e99becd2 100644 --- a/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts +++ b/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts @@ -98,7 +98,7 @@ export class ViewportTracker { console.debug(`Found ${leafTrackingCandidates.size} leaf tracking elements`) const options = { - root: element.ownerDocument, + root: element.ownerDocument.body, rootMargin: '0px', threshold: 0.0 }