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

オープン
#16,331 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Triage :mag:
主要言語
C++
スター
17.3k
フォーク
1.2k
平均マージ
1日 13時間
マージ済み PR(30日)
33

説明

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
  1. 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.
  2. Render <TextInput placeholder="tap me" /> and tap it with touch.
  3. Observe: the field focuses (caret blinks) but the touch keyboard never appears — there is no way to enter text.
  4. 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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp から開始し、onGotFocus パスと、issue で特定されている既存のキーボード関連の参照に注目してください。PR #16330 を確認し、キーボードのない Windows タブレットでの動作を検証してください。非表示にした後、すでにフォーカスされているフィールドをタップする場合も含みます。TextInput にフォーカスするか再タップすると、WinAppSDK island configuration でタッチキーボードが表示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, react-native
領域
desktop, operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。