Skip to content

Commit

Permalink
Fixes Textarea iOS15 inset issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelHolec committed Jan 3, 2024
1 parent a91b900 commit 5d590ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/Orbit/Support/TextFields/InsetableTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public class InsetableTextView: UITextView {
public override func layoutSubviews() {
super.layoutSubviews()
contentInset = insets
// Fixes iOS15 inset issues
contentOffset = .init(x: -insets.left, y: contentOffset.y)
let size = promptLabel.sizeThatFits(bounds.inset(by: insets).size)
promptLabel.frame = .init(origin: .zero, size: size)
}
Expand Down

0 comments on commit 5d590ea

Please sign in to comment.