microsoft / microsoft/react-native-windows
Fabric TextInput never invokes the touch keyboard on focus in a WinAppSDK island app (windowless RichEdit) — keyboard never appears on a keyboard-less tablet
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 17.3k
- Forks
- 1.2k
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 33
Beschreibung
Problem Description
On a Windows tablet with no physical keyboard, tapping a single-line <TextInput> never raises the on-screen touch keyboard. The field focuses (caret blinks) but there is no way to type.
Fabric/Composition TextInput (WindowsTextInputComponentView) does nothing to invoke the touch keyboard on focus, and in a WinAppSDK Win32 island app there is no CoreWindow and the RichEdit is hosted windowless via ITextServices (no child edit HWND) — so the OS's own touch-keyboard auto-invoke heuristic (which keys off a focused editable HWND + touch focus + the OS setting) never fires either. Net: the keyboard never appears.
Root cause — confirmed in 0.83.2 source. In vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp, onGotFocus only forwards WM_SETFOCUS to the RichEdit ITextServices and handles clearTextOnFocus/selectTextOnFocus; it never touches InputPane/CoreInputView. A full-tree search for InputPane | IInputPaneInterop | TryShow | CoreInputView | CoreTextServicesManager | ShowKeyboard finds a single hit — ScrollViewComponentView.cpp calling CoreInputView::GetForCurrentView().TryHide() for keyboardDismissMode, which is itself a no-op without a CoreWindow. The old UWP-era PR #2029 attempted show-on-focus for the Paper renderer and was closed; it relied on GetForCurrentView() APIs that don't apply to the island model.
The OS Settings toggle Time & language → Typing → Touch keyboard → "Show the touch keyboard when there's no keyboard attached" does not help, because the heuristic has no focused edit control to observe for the windowless RichEdit host — a programmatic InputPane.TryShow() is required.
Steps To Reproduce
- New-architecture RNW 0.83.2 app (WinAppSDK island /
ReactNativeWin32App), deployed to a Windows tablet with no physical keyboard attached (or detach the keyboard cover on a 2-in-1). Note: Windows suppresses the touch keyboard while a hardware keyboard is attached, so the bug must be observed with the keyboard detached. - Render
<TextInput placeholder="tap me" />and tap it with touch. - Observe: the field focuses (caret blinks) but the touch keyboard never appears — there is no way to enter text.
- Also: after any dismissal of the keyboard, re-tapping the (still-focused) field does not re-raise it, because a tap on an already-focused field does not fire
onGotFocus.
Expected Results
Focusing or tapping a TextInput on a touch device with no hardware keyboard should raise the touch keyboard (iOS/Android parity and the platform expectation). Re-tapping a field after the keyboard was dismissed should re-raise it.
CLI version
18.0.0
Environment
System:
OS: Windows 11 10.0.26200 (x64 tablet)
CPU: x64
Memory: ~16 GB
Binaries:
Node: 22.x
Yarn: 4.5.1
SDKs:
Windows SDK versions: 10.0.19041.0, 10.0.22621.0, 10.0.26100.0
IDEs:
Visual Studio: 17.14 (Community 2022), 18.6 (Community 2026)
npmPackages:
react-native: 0.83.2
react-native-windows: 0.83.2 (New Architecture / Fabric composition)
Microsoft.WindowsAppSDK: 1.8
Community Modules
Not relevant — reproduces with the core TextInput.
Target React Native Architecture
New Architecture (WinAppSDK) Only
Target Platform Version
10.0.22621
Visual Studio Version
Visual Studio 2022
Build Configuration
Release
Snack, code example, screenshot, or link to a repository
// On a keyboard-less tablet, tapping this never raises the touch keyboard:
<TextInput placeholder="tap me on a keyboard-less tablet" />
Context: found during a Windows hardening pass of a production RNW 0.83.2 new-arch app (Facilitron FIT), validated on physical x64 tablet hardware. Fix PR: #16330. Sibling TextInput fixes from the same investigation: #16302, #16303.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp und konzentriere dich auf den onGotFocus-Pfad sowie auf die im Issue identifizierten bestehenden Verweise mit Bezug zur Tastatur. Überprüfe PR #16330 und validiere das Verhalten auf einem Windows-Tablet ohne Tastatur, einschließlich des Antippens eines bereits fokussierten Felds nach dem Ausblenden. Als erledigt gilt die Aufgabe, wenn das Fokussieren oder erneute Antippen von TextInput die Bildschirmtastatur in der WinAppSDK island configuration öffnet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, react-native
- Bereich
- desktop, operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 35/100