Skip to content

Commit 05739f6

Browse files
[0.81] fix text input scaling (#16293)
* Fixes misalignment with TextInput on different display scales * Change files --------- Co-authored-by: Vineeth <66076509+vineethkuttan@users.noreply.github.com>
1 parent 77f622f commit 05739f6

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
@@ -1329,7 +1329,7 @@ void WindowsTextInputComponentView::updateLayoutMetrics(
13291329
facebook::react::LayoutMetrics const &oldLayoutMetrics) noexcept {
13301330
// Set Position & Size Properties
13311331

1332-
if ((layoutMetrics.pointScaleFactor != m_layoutMetrics.pointScaleFactor)) {
1332+
if (m_textServices && layoutMetrics.pointScaleFactor > 0) {
13331333
LRESULT res;
13341334
winrt::check_hresult(m_textServices->TxSendMessage(
13351335
(WM_USER + 328), // EM_SETDPI

0 commit comments

Comments
 (0)