diff --git a/change/react-native-windows-a67cca50-e44b-4dfd-82c0-d862ee697ddb.json b/change/react-native-windows-a67cca50-e44b-4dfd-82c0-d862ee697ddb.json new file mode 100644 index 00000000000..93f15d036f2 --- /dev/null +++ b/change/react-native-windows-a67cca50-e44b-4dfd-82c0-d862ee697ddb.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Mark Text dirty when descendant Text updates occur", + "packageName": "react-native-windows", + "email": "erozell@outlook.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp b/vnext/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp index ef30d0a98cb..f2ada33072a 100644 --- a/vnext/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp +++ b/vnext/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp @@ -41,6 +41,7 @@ void TextPropertyChangedParentVisitor::VisitText(ShadowNodeBase *node) { } TextViewManager::UpdateOptimizedText(node); + node->GetViewManager()->MarkDirty(node->m_tag); } // Refresh text highlighters diff --git a/vnext/Microsoft.ReactNative/Views/TextViewManager.cpp b/vnext/Microsoft.ReactNative/Views/TextViewManager.cpp index 7117150d109..ec5d7d0f1da 100644 --- a/vnext/Microsoft.ReactNative/Views/TextViewManager.cpp +++ b/vnext/Microsoft.ReactNative/Views/TextViewManager.cpp @@ -83,6 +83,7 @@ class TextShadowNode final : public ShadowNodeBase { } RecalculateTextHighlighters(); + GetViewManager()->MarkDirty(m_tag); } void removeAllChildren() override { @@ -93,6 +94,7 @@ class TextShadowNode final : public ShadowNodeBase { Super::removeAllChildren(); } RecalculateTextHighlighters(); + GetViewManager()->MarkDirty(m_tag); } void RemoveChildAt(int64_t indexToRemove) override { @@ -102,6 +104,7 @@ class TextShadowNode final : public ShadowNodeBase { Super::RemoveChildAt(indexToRemove); } RecalculateTextHighlighters(); + GetViewManager()->MarkDirty(m_tag); } void UpdateOptimizedText() {