From a73cffb139c42c2bf9e79da7b21ecf8c31e6def6 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Mon, 18 Oct 2021 17:44:30 +0100 Subject: [PATCH] Disable double-click to create text --- .../tldraw/src/state/tool/SelectTool/SelectTool.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/tldraw/src/state/tool/SelectTool/SelectTool.ts b/packages/tldraw/src/state/tool/SelectTool/SelectTool.ts index 0e2b46004..d079c1c1c 100644 --- a/packages/tldraw/src/state/tool/SelectTool/SelectTool.ts +++ b/packages/tldraw/src/state/tool/SelectTool/SelectTool.ts @@ -427,16 +427,17 @@ export class SelectTool extends BaseTool { this.setStatus(Status.PointingCanvas) } - onDoubleClickCanvas: TLCanvasEventHandler = (info) => { - const pagePoint = this.state.getPagePoint(info.point) - this.state.selectTool(TLDrawShapeType.Text) - this.setStatus(Status.Idle) - this.state.createTextShapeAtPoint(pagePoint) + onDoubleClickCanvas: TLCanvasEventHandler = () => { + // Not working on mobile + // const pagePoint = this.state.getPagePoint(info.point) + // this.state.selectTool(TLDrawShapeType.Text) + // this.setStatus(Status.Idle) + // this.state.createTextShapeAtPoint(pagePoint) } // Shape - onPointLinkHandle: TLPointerEventHandler = (info, e) => { + onPointLinkHandle: TLPointerEventHandler = () => { if (this.status === Status.Idle) { this.setStatus(Status.PointingLinkHandle) }