MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onPointerDown

Method onPointerDown

packages/react-aria/src/dnd/DragManager.ts:366–371  ·  view source on GitHub ↗
(e: PointerEvent)

Source from the content-addressed store, hash-verified

364 }
365
366 onPointerDown(e: PointerEvent): void {
367 // Android Talkback double tap has e.detail = 1 for onClick. Detect the virtual click in onPointerDown before onClick fires
368 // so we can properly perform cancel and drop operations.
369 this.cancelEvent(e);
370 this.isVirtualClick = isVirtualPointerEvent(e);
371 }
372
373 cancelEvent(e: Event): void {
374 // Allow focusin and focusout on the drag target so focus ring works properly.

Callers

nothing calls this directly

Calls 2

cancelEventMethod · 0.95
isVirtualPointerEventFunction · 0.90

Tested by

no test coverage detected