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

Function onPress

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

Source from the content-addressed store, hash-verified

238 };
239
240 let onPress = (e: PressEvent) => {
241 if (!isDisabled && (e.pointerType === 'touch' || e.pointerType === 'mouse')) {
242 // For touch or on a desktop device with a small screen open on press up to possible problems with
243 // press up happening on the newly opened tray items
244 onSubmenuOpen();
245 }
246 };
247
248 let onHoverChange = isHovered => {
249 if (!isDisabled) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected