fix pointer error

This commit is contained in:
Steve Ruiz 2022-01-06 13:23:45 +00:00
parent 32d96aef94
commit deadc70030

View file

@ -424,8 +424,7 @@ const InnerTldraw = React.memo(function InnerTldraw({
const elm = rWrapper.current
if (!elm) return
if (!elm.contains(e.relatedTarget)) return
const event = new Event('pointerdown', { bubbles: true }) as any
event.pointerId = -1 // Hopefully fix a bug where @use-gesture tries to set pointer capture
const event = new Event('mousedown', { bubbles: true }) as any
elm.dispatchEvent(event)
elm.dispatchEvent(event)
}, [])