note: fix paragraphs not appearing on iOS17
In some edge cases, the inflated UiTextView didn't render properly causing a black screen which needed the user to scroll. Dropped the inflate size and now only set where selectedTextHeight is .zero, seems more reliable. Closes: https://github.com/damus-io/damus/pull/1427 Changelog-Fixed: Fix paragraphs not appearing on iOS17
This commit is contained in:
@@ -28,7 +28,11 @@ struct SelectableText: View {
|
|||||||
)
|
)
|
||||||
.padding([.leading, .trailing], -1.0)
|
.padding([.leading, .trailing], -1.0)
|
||||||
.onAppear {
|
.onAppear {
|
||||||
self.selectedTextWidth = geo.size.width
|
if geo.size.width == .zero {
|
||||||
|
self.selectedTextHeight = 1000.0
|
||||||
|
} else {
|
||||||
|
self.selectedTextWidth = geo.size.width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.onChange(of: geo.size) { newSize in
|
.onChange(of: geo.size) { newSize in
|
||||||
self.selectedTextWidth = newSize.width
|
self.selectedTextWidth = newSize.width
|
||||||
|
|||||||
Reference in New Issue
Block a user