From b1f7b50372fa3b401b13fd13007af7a43a592464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Str=C3=B6mberg?= Date: Wed, 8 Feb 2023 07:35:46 +0100 Subject: [PATCH] Fixing issue #15314 --- Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs index ec2ee7a5250..7c9d130617b 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs @@ -263,6 +263,9 @@ void UpdateTextDecorations() if (!(Control.AttributedStringValue?.Length > 0)) return; #endif + // If FormattedText is changed after the initial render, it will be removed on either line 285 or line 290. + if(IsTextFormatted && _formatted.Spans?.Any(span => span.TextDecoration > TextDecorations.None)) + return; var textDecorations = Element.TextDecorations; #if __MOBILE__