Skip to content

Commit 8e869d7

Browse files
authored
[0.83] fix text input scaling (#16291)
* Fixes misalignment with TextInput on different display scales * Change files
1 parent 1da9245 commit 8e869d7

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fixes misalignment with TextInput on different display scales",
4+
"packageName": "react-native-windows",
5+
"email": "dlucas@seabird.com",
6+
"dependentChangeType": "patch"
7+
}

vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ void WindowsTextInputComponentView::updateLayoutMetrics(
12761276
facebook::react::LayoutMetrics const &oldLayoutMetrics) noexcept {
12771277
// Set Position & Size Properties
12781278

1279-
if ((layoutMetrics.pointScaleFactor != m_layoutMetrics.pointScaleFactor)) {
1279+
if (m_textServices && layoutMetrics.pointScaleFactor > 0) {
12801280
LRESULT res;
12811281
winrt::check_hresult(m_textServices->TxSendMessage(
12821282
(WM_USER + 328), // EM_SETDPI

0 commit comments

Comments
 (0)