Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Fix multiline TextInput crash from TxDrawD2D reentrancy",
"packageName": "react-native-windows",
"email": "74712637+iamAbhi-916@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,10 @@ void WindowsTextInputComponentView::DrawText() noexcept {
}

// TODO keep track of proper invalid rect
// Prevent reentrancy: TxDrawD2D may call TxViewChange -> DrawText
m_cDrawBlock++;
auto hrDraw = m_textServices->TxDrawD2D(d2dDeviceContext, &rc, nullptr, TXTVIEW_ACTIVE);
m_cDrawBlock--;
winrt::check_hresult(hrDraw);

// draw placeholder text if needed
Expand Down
Loading