Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ios/extensions/UITextInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import UIKit

public extension UITextInput {
var canSelectionFitIntoLayout: Bool {
guard let textView = self as? UITextView else { return true }

// Force layout to ensure accurate rect calculation
textView.layoutManager.ensureLayout(for: textView.textContainer)

guard let selectedRange = selectedTextRange else { return false }

guard let range = textRange(from: selectedRange.start, to: selectedRange.end) else { return false }
Expand Down
2 changes: 1 addition & 1 deletion ios/views/KeyboardExtenderContainerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private class BaseContainerView: UIInputView {
// Override in subclasses
}

override public var intrinsicContentSize: CGSize {
override var intrinsicContentSize: CGSize {
return CGSize(width: UIView.noIntrinsicMetric, height: frame.height)
}
}
Expand Down
Loading