@@ -637,6 +637,20 @@ open class TextView: UIScrollView {
637637 let height = baseContentSize. height + verticalOverscrollLength
638638 return CGSize ( width: width, height: height)
639639 }
640+ @available ( iOS 26 . 0 , * )
641+ private var scrollPocketView : UIView ? {
642+ if let _scrollPocketView = _scrollPocketView {
643+ return _scrollPocketView
644+ } else {
645+ let stringType = String ( " IU_ " . reversed ( ) ) + " Scroll " + String( " tekcoP " . reversed ( ) )
646+ let scrollPocketView = subviews. first { view in
647+ String ( describing: type ( of: view) ) == stringType
648+ }
649+ _scrollPocketView = scrollPocketView
650+ return scrollPocketView
651+ }
652+ }
653+ private var _scrollPocketView : UIView ?
640654
641655 /// Create a new text view.
642656 /// - Parameter frame: The frame rectangle of the text view.
@@ -674,6 +688,9 @@ open class TextView: UIScrollView {
674688 textInputView. frame = CGRect ( x: 0 , y: 0 , width: max ( contentSize. width, frame. width) , height: max ( contentSize. height, frame. height) )
675689 textInputView. viewport = CGRect ( origin: contentOffset, size: frame. size)
676690 bringSubviewToFront ( textInputView. gutterContainerView)
691+ if #available( iOS 26 , * ) , let scrollPocketView {
692+ bringSubviewToFront ( scrollPocketView)
693+ }
677694 }
678695
679696 /// Called when the safe area of the view changes.
0 commit comments