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

Function onPress

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

Source from the content-addressed store, hash-verified

334
335 // Press handlers for the ComboBox button
336 let onPress = (e: PressEvent) => {
337 if (e.pointerType === 'touch') {
338 // Focus the input field in case it isn't focused yet
339 inputRef.current?.focus();
340 state.toggle(null, 'manual');
341 }
342 };
343
344 let onPressStart = (e: PressEvent) => {
345 if (e.pointerType !== 'touch') {

Callers

nothing calls this directly

Calls 2

focusMethod · 0.80
toggleMethod · 0.65

Tested by

no test coverage detected