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

Function onKeyUpCapture

packages/react-aria/src/dnd/useDrag.ts:395–401  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

393 }
394 },
395 onKeyUpCapture(e) {
396 if (getEventTarget(e) === e.currentTarget && e.key === 'Enter') {
397 e.preventDefault();
398 e.stopPropagation();
399 startDragging(getEventTarget(e));
400 }
401 },
402 onClick(e) {
403 // Handle NVDA/JAWS in browse mode, and touch screen readers. In this case, no keyboard events are fired.
404 if (isVirtualClick(e.nativeEvent) || modalityOnPointerDown.current === 'virtual') {

Callers 1

useDraggableItemFunction · 0.85

Calls 2

getEventTargetFunction · 0.90
startDraggingFunction · 0.70

Tested by

no test coverage detected