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

Function onKeyUpCapture

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

Source from the content-addressed store, hash-verified

394 }
395 },
396 onKeyUpCapture(e) {
397 if (getEventTarget(e) === e.currentTarget && e.key === 'Enter') {
398 e.preventDefault();
399 e.stopPropagation();
400 startDragging(getEventTarget(e));
401 }
402 },
403 onClick(e) {
404 // Handle NVDA/JAWS in browse mode, and touch screen readers. In this case, no keyboard events are fired.
405 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