diff --git a/src/index.tsx b/src/index.tsx index cc91d144d..4dd1c5307 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -118,6 +118,8 @@ function hitTest(element: ExcalidrawElement, x: number, y: number): boolean { const y2 = getElementAbsoluteY2(element); return x >= x1 && x <= x2 && y >= y1 && y <= y2; + } else if (element.type === "selection") { + return false; } else { throw new Error("Unimplemented type " + element.type); }