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

Method onKeyUp

packages/react-aria/src/dnd/DragManager.ts:249–259  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

247 }
248
249 onKeyUp(e: KeyboardEvent): void {
250 this.cancelEvent(e);
251
252 if (e.key === 'Enter') {
253 if (e.altKey || nodeContains(this.getCurrentActivateButton(), getEventTarget(e) as Node)) {
254 this.activate(this.currentDropTarget, this.currentDropItem);
255 } else {
256 this.drop();
257 }
258 }
259 }
260
261 getCurrentActivateButton(): FocusableElement | null {
262 return (

Callers 3

onKeyUpFunction · 0.80
onKeyUpFunction · 0.80
onKeyUpFunction · 0.80

Calls 6

cancelEventMethod · 0.95
activateMethod · 0.95
dropMethod · 0.95
nodeContainsFunction · 0.90
getEventTargetFunction · 0.90

Tested by

no test coverage detected