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

Function onClick

packages/react-aria/src/interactions/useInteractOutside.ts:70–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 // Use pointer events if available. Otherwise, fall back to mouse and touch events.
69 if (typeof PointerEvent !== 'undefined') {
70 let onClick = e => {
71 if (state.isPointerDown && isValidEvent(e, ref)) {
72 triggerInteractOutside(e);
73 }
74 state.isPointerDown = false;
75 };
76
77 // changing these to capture phase fixed combobox
78 // Use click instead of pointerup to avoid Android Chrome issue

Callers

nothing calls this directly

Calls 1

isValidEventFunction · 0.85

Tested by

no test coverage detected