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

Function onLongPress

packages/react-aria/src/interactions/useContextMenu.ts:64–70  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

62 firedContextMenuEvent.current = false;
63 },
64 onLongPress(e) {
65 if (!firedContextMenuEvent.current) {
66 onContextMenu?.({target: e.target, x: e.x, y: e.y});
67 } else {
68 firedContextMenuEvent.current = false;
69 }
70 }
71 });
72
73 if (!onContextMenu) {

Callers 1

onPressStartFunction · 0.70

Calls 1

onContextMenuFunction · 0.70

Tested by

no test coverage detected