Skip to content

Commit

Permalink
No issue: Fix TS compiler complaining
Browse files Browse the repository at this point in the history
  • Loading branch information
reckart committed Nov 11, 2023
1 parent 4aa065f commit 3b29179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3b29179

Please sign in to comment.