diff --git a/change/react-native-windows-5e8af782-1cd1-4b6a-84fd-7d13baffe3cd.json b/change/react-native-windows-5e8af782-1cd1-4b6a-84fd-7d13baffe3cd.json new file mode 100644 index 00000000000..d75e82da5f5 --- /dev/null +++ b/change/react-native-windows-5e8af782-1cd1-4b6a-84fd-7d13baffe3cd.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Fixes misalignment with TextInput on different display scales", + "packageName": "react-native-windows", + "email": "dlucas@seabird.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp index 7a5f30d8a66..2fd8fcde9a1 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp @@ -1276,7 +1276,7 @@ void WindowsTextInputComponentView::updateLayoutMetrics( facebook::react::LayoutMetrics const &oldLayoutMetrics) noexcept { // Set Position & Size Properties - if ((layoutMetrics.pointScaleFactor != m_layoutMetrics.pointScaleFactor)) { + if (m_textServices && layoutMetrics.pointScaleFactor > 0) { LRESULT res; winrt::check_hresult(m_textServices->TxSendMessage( (WM_USER + 328), // EM_SETDPI