File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import UIKit
2+
3+ @available ( iOS 17 , * )
4+ extension UITextInput where Self: NSObject {
5+ var sbs_textSelectionDisplayInteraction : UITextSelectionDisplayInteraction ? {
6+ let interactionAssistantKey = " int " + " ssAnoitcare " . reversed ( ) + " istant "
7+ let selectionViewManagerKey = " les_ " . reversed ( ) + " ection " + " reganaMweiV " . reversed ( )
8+ guard responds ( to: Selector ( interactionAssistantKey) ) else {
9+ return nil
10+ }
11+ guard let interactionAssistant = value ( forKey: interactionAssistantKey) as? AnyObject else {
12+ return nil
13+ }
14+ guard interactionAssistant. responds ( to: Selector ( selectionViewManagerKey) ) else {
15+ return nil
16+ }
17+ return interactionAssistant. value ( forKey: selectionViewManagerKey) as? UITextSelectionDisplayInteraction
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -1238,6 +1238,10 @@ private extension TextView {
12381238 isInputAccessoryViewEnabled = true
12391239 textInputView. removeInteraction ( nonEditableTextInteraction)
12401240 textInputView. addInteraction ( editableTextInteraction)
1241+ if #available( iOS 17 , * ) {
1242+ // Workaround a bug where the caret does not appear until the user taps again on iOS 17 (FB12622609).
1243+ textInputView. sbs_textSelectionDisplayInteraction? . isActivated = true
1244+ }
12411245 }
12421246 }
12431247
You can’t perform that action at this time.
0 commit comments