NuPlay / RichText

Easily show RichText(html) in SwiftUI
MIT License
209 stars 36 forks source link

<DETAILS>...</DETAILS> #18

Open CarolSmall opened 2 years ago

CarolSmall commented 2 years ago

I really like this package but I've run into an issue. I've got this code:

import SwiftUI import RichText struct MainView : View { var body: some View { ScrollView { RichText(html: Documents.Welcome) } } and when it runs I get a bunch of warnings: [ViewportSizing] maximumViewportInset cannot be larger than frame (similarly for minimumViewportInset). Documents.Welcome is quite large but the warnings didn't seem to be a problem.

But today I added a "details" section:

CLICK HERE

There's a lot of text here.

and nothing renders after the details link. The same document loads in web browsers (Chrome, Safari, etc) perfectly ok.

CarolSmall commented 2 years ago

Just to add that the bug is clear with just this:

ScrollView { RichText(html: "
SummaryHere's the body.
") }) { Text("Rich Text Bug") }