MCPcopy Index your code
hub / github.com/adobe/react-spectrum / pressUp

Function pressUp

packages/react-aria/src/interactions/usePress.ts:413–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411 // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.
412 let originalTarget = e.currentTarget;
413 let pressUp = e => {
414 if (
415 isValidKeyboardEvent(e, originalTarget) &&
416 !e.repeat &&
417 nodeContains(originalTarget, getEventTarget(e) as Element) &&
418 state.target
419 ) {
420 // eslint-disable-next-line react-hooks/rules-of-hooks
421 triggerPressUpEvent(createEvent(state.target, e), 'keyboard');
422 }
423 };
424
425 addGlobalListener(
426 getOwnerDocument(e.currentTarget),

Callers

nothing calls this directly

Calls 4

nodeContainsFunction · 0.90
getEventTargetFunction · 0.90
isValidKeyboardEventFunction · 0.85
createEventFunction · 0.85

Tested by

no test coverage detected