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

Function onPressStart

packages/react-aria/src/menu/useSubmenuTrigger.ts:233–238  ·  view source on GitHub ↗
(e: PressEvent)

Source from the content-addressed store, hash-verified

231 });
232
233 let onPressStart = (e: PressEvent) => {
234 if (!isDisabled && (e.pointerType === 'virtual' || e.pointerType === 'keyboard')) {
235 // If opened with a screen reader or keyboard, auto focus the first submenu item.
236 onSubmenuOpen('first');
237 }
238 };
239
240 let onPress = (e: PressEvent) => {
241 if (!isDisabled && (e.pointerType === 'touch' || e.pointerType === 'mouse')) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected