Skip to content

Commit

Permalink
Fix failing widgets tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Aug 16, 2024
1 parent 422ec79 commit 46c6bbf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/ckeditor5-engine/src/view/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,12 @@ export function getPointViewRange(
rangeOffset?: number;
}
): Range | null {
const domDoc = ( domEvent.target as HTMLElement ).ownerDocument!;
const domDoc = ( domEvent.target as HTMLElement ).ownerDocument;

if ( !domDoc ) {
return null;
}

const x = domEvent.clientX;
const y = domEvent.clientY;
let domRange;
Expand Down

0 comments on commit 46c6bbf

Please sign in to comment.