Skip to content

[iOS,Mac] Label with TextType Html the label is measured as height 0. #31674

@AneesFathimaS

Description

@AneesFathimaS

Description

In our application, when a Label with TextType set to "Html" is placed inside a ContentView and layout, the HTML content does not appear in the view. In the layout's Measure method, the height is calculated using PositiveInfinity to determine the child’s height, but the result is 0.

To replicate the issue, we set a flag named isEnsured to true during the first measure call in the ContentView's Measure method, which prevents a second measure call. This check is performed in the layout's Measure method.

However, when TextType is set to "Text" instead of "Html", the content is displayed correctly.

Issue Image:
Image

Expected image:
Image

Steps to Reproduce

Steps to Reproduce

  1. Run the project.
  2. The Hello label text is not visible.

Expected: The "Hello" label Html text should be visible.
Actual: The "Hello" label Html text is not visible.

Link to public reproduction project repository

FrameworkIssue (2).zip

Version with bug

10.0.0-rc.1

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

No response

Affected platforms

macOS, iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-labelLabel, Spanplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions