Repository navigation
Components: Win32 Button does not report onPressOut after Space with an intervening key #4373
Description
Summary
On the Win32 endpoint (Office @office-iss/react-native-win32 0.81.9 Paper, hosted by the prebuilt REX 0.81.1 host in the agentic Storybook), the agentic Button does not forward onPressOut when Space is pressed, another key is pressed and released while Space is held, and then Space is released. Pressed feedback does clear and no stale activation occurs; only the press-out callback is missing.
Part of #4274.
Priorities and help requested
Willing to submit a PR to fix?
Not specified.
Requested priority
Not specified.
Products/applications affected
Agentic Storybook Button on the Win32 endpoint.
Environment Information
Package version(s)
Office @office-iss/react-native-win32 0.81.9 Paper in the prebuilt REX 0.81.1 host. Comparison evidence: React Native Windows Fabric 0.81.35 passes this case.
OS version(s)
Windows / Win32 endpoint in owned smoke runs on 2026-10-15; specific Windows build not recorded.
Platform
- iOS
- macOS
- win32
- windows
- android
Xcode version
Not applicable.
Please provide a reproduction of the bug
Authored desktop test components-button--focus-management / releases pressed feedback after an intervening key without a stale activation in packages/agentic/components/src/components/button/button.stories.tsx (FocusManagement story, around line 277).
Steps:
- Focus the button by pressing Tab from the
focus-probe-entryInput. - Perform key actions: keyDown Space (
U+E00D), keyDownx, keyUpx, keyUp Space.
Expected per the test: focus-probe-count = 0 on Windows/Win32 (1 on macOS), focus-probe-pressed = false, and focus-probe-release-count = 1.
Command from apps/storybook:
$env:STORYBOOK_SMOKE_STORY = 'components-button--focus-management'; yarn storybook smoke --win32 --mode stories-and-testsActual behavior
On Win32, focus-probe-count = 0 and focus-probe-pressed = false pass, but focus-probe-release-count remains 0 instead of 1.
Expected behavior
The press-out callback is forwarded exactly once, so focus-probe-release-count becomes 1, while preserving no stale activation and clearing pressed feedback.
Platform status
Fails consistently on Win32, reproduced in two consecutive owned smoke runs on 2026-10-15. The same case passes on React Native Windows Fabric (RNW 0.81.35; full Windows catalog 43/43) and is part of the macOS catalog. All other Win32 authored cases pass: 25/25 outside this story and 6/7 within it.
Context
This failure was previously masked: every *--focus-* story failed earlier at its first Input click because the Windows Desktop Driver pressed without coordinates and an absolute pointing device (remote/VM viewer) on the test console moved the cursor back. A Desktop Driver fix that delivers each click as one coordinate-carrying SendInput batch is on branch user/jasonvmo/native-lib2 (local commit pending push), after which this keyboard case became the remaining Win32 failure.
Relevant guidance: references/agents/focus/windows-win32.md (exactly-once activation, Win32 Unidentified key codes, useFocusablePressable paired key-up fallback, and always finish pressed feedback on release without forwarding onPressOut twice) and references/agents/focus/common.md.
Likely starting point, not a confirmed root cause: useFocusablePressable in packages/framework-base and the Button state hook.
Acceptance
The Win32 case passes in the owned smoke lifecycle without regressing exactly-once activation on Win32, Windows, or macOS.
Activity
Record Windows and Win32 requalification after the pointer-focus and …
JasonVMo commentedon Oct 16, 2026
PR #4381 quarantines only the Win32 intervening-key authored case with an explicit issue-linked skip. Windows Fabric and macOS retain the complete assertion, and all other Win32 cases remain enabled. The regression is not fixed and this issue must remain open. When fixing the press-out callback, remove the Win32 guard from packages/agentic/components/src/components/button/button.stories.tsx and its temporary note in spec/interaction.md, then qualify the case with real input on Win32 plus Windows/macOS exactly-once regression coverage.