From 3f5ec1018412f737aef2cc6a679d9ffa78d6d754 Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Wed, 12 Nov 2025 09:46:10 -0800 Subject: [PATCH 1/2] Add TSF support to TextInput (#15363) * Add TSF support to TextInput * Change files --- ...ative-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json | 7 +++++++ .../TextInput/WindowsTextInputComponentView.cpp | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json diff --git a/change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json b/change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json new file mode 100644 index 00000000000..35ffe563a9d --- /dev/null +++ b/change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Add TSF support to TextInput", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp index 0ceb92f0b3a..c4cb0bbc7cd 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp @@ -1592,6 +1592,9 @@ WindowsTextInputComponentView::createVisual() noexcept { LRESULT res; winrt::check_hresult(m_textServices->TxSendMessage(EM_SETTEXTMODE, TM_PLAINTEXT, 0, &res)); + // Enable TSF support + winrt::check_hresult(m_textServices->TxSendMessage(EM_SETEDITSTYLE, SES_USECTF, SES_USECTF, nullptr)); + m_caretVisual = m_compContext.CreateCaretVisual(); visual.InsertAt(m_caretVisual.InnerVisual(), 0); m_caretVisual.IsVisible(false); From 91d70d1b91599058aeb7475dc0b3ecafc2e124fb Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Wed, 12 Nov 2025 09:47:13 -0800 Subject: [PATCH 2/2] fix change file --- ...act-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json b/change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json index 35ffe563a9d..202e0bb4ea5 100644 --- a/change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json +++ b/change/react-native-windows-055a5eb5-8f2c-409e-a4b4-4ba382eeeae0.json @@ -1,5 +1,5 @@ { - "type": "prerelease", + "type": "patch", "comment": "Add TSF support to TextInput", "packageName": "react-native-windows", "email": "30809111+acoates-ms@users.noreply.github.com",