(e)
| 116 | let pressProps: PressProps = { |
| 117 | preventFocusOnPress: true, |
| 118 | onPressStart(e) { |
| 119 | // For consistency with native, open the menu on mouse/key down, but touch up. |
| 120 | if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) { |
| 121 | // Ensure trigger has focus before opening the menu so it can be restored by FocusScope on close. |
| 122 | focusWithoutScrolling(e.target as FocusableElement); |
| 123 | |
| 124 | // If opened with a screen reader, auto focus the first item. |
| 125 | // Otherwise, the menu itself will be focused. |
| 126 | state.open(e.pointerType === 'virtual' ? 'first' : null); |
| 127 | } |
| 128 | }, |
| 129 | onPress(e) { |
| 130 | if (e.pointerType === 'touch' && !isDisabled) { |
| 131 | // Ensure trigger has focus before opening the menu so it can be restored by FocusScope on close. |
nothing calls this directly
no test coverage detected