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

Function onPressStart

packages/react-aria/src/combobox/useComboBox.ts:344–352  ·  view source on GitHub ↗
(e: PressEvent)

Source from the content-addressed store, hash-verified

342 };
343
344 let onPressStart = (e: PressEvent) => {
345 if (e.pointerType !== 'touch') {
346 inputRef.current?.focus();
347 state.toggle(
348 e.pointerType === 'keyboard' || e.pointerType === 'virtual' ? 'first' : null,
349 'manual'
350 );
351 }
352 };
353
354 let triggerLabelProps = useLabels({
355 id: menuTriggerProps.id,

Callers

nothing calls this directly

Calls 2

focusMethod · 0.80
toggleMethod · 0.65

Tested by

no test coverage detected