Skip to content

Commit

Permalink
Disables horizontal overscroll when line wrapping is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbs committed May 4, 2022
1 parent 32e8091 commit 1478adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Runestone/TextView/TextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public final class TextView: UIScrollView {
let horizontalOverscrollLength = max(frame.width * horizontalOverscrollFactor, 0)
let verticalOverscrollLength = max(frame.height * verticalOverscrollFactor, 0)
let baseContentSize = textInputView.contentSize
let width = baseContentSize.width + horizontalOverscrollLength
let width = isLineWrappingEnabled ? baseContentSize.width : baseContentSize.width + horizontalOverscrollLength
let height = baseContentSize.height + verticalOverscrollLength
return CGSize(width: width, height: height)
}
Expand Down

0 comments on commit 1478adb

Please sign in to comment.