Skip to content

Commit 0ad650a

Browse files
committed
Don't Try to Set a Negative Frame Height
1 parent d82b1c0 commit 0ad650a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/CodeEditTextView/TextView/TextView+Layout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ extension TextView {
7272
availableSize.height -= (scrollView?.contentInsets.top ?? 0) + (scrollView?.contentInsets.bottom ?? 0)
7373

7474
let extraHeight = availableSize.height * overscrollAmount
75-
let newHeight = max(layoutManager.estimatedHeight() + extraHeight, availableSize.height)
75+
let newHeight = max(layoutManager.estimatedHeight() + extraHeight, availableSize.height, 0)
7676
let newWidth = layoutManager.estimatedWidth()
7777

7878
var didUpdate = false

0 commit comments

Comments
 (0)