Browse Source

fix: pencil issue when drawing quickly (#7781)

* fix: pencil issue when drawing quickly

* fix: fix touch callout in iOS
Peng Xiao 2 years ago
parent
commit
0a2737782b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tldraw/packages/react/src/hooks/useCanvasEvents.ts

+ 4 - 0
tldraw/packages/react/src/hooks/useCanvasEvents.ts

@@ -75,6 +75,10 @@ export function useCanvasEvents() {
       onPointerLeave,
       onDrop,
       onDragOver,
+      // fix touch callout in iOS
+      onTouchEnd: (e: TouchEvent) => {
+        e.preventDefault()
+      }
     }
   }, [callbacks])