Skip to content

Commit

Permalink
Hide the vertical scrollbar when the editor's config disables scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi authored Oct 8, 2024
2 parents 1a466a0 + 7b00ab4 commit ceee5fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/RichTextKit/RichTextEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public struct RichTextEditor: ViewRepresentable {
public let scrollView = RichTextView.scrollableTextView()

public var textView: RichTextView {
scrollView.documentView as? RichTextView ?? RichTextView()
scrollView.hasVerticalScroller = config.isScrollingEnabled
return scrollView.documentView as? RichTextView ?? RichTextView()
}
#endif

Expand Down

0 comments on commit ceee5fe

Please sign in to comment.