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 4d266de69b6..8b93f311728 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp @@ -1742,6 +1742,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);