Skip to content

Commit

Permalink
disable inline predictions to prevent ios composer jank (#3363)
Browse files Browse the repository at this point in the history
* disable inline predictions to prevent ios composer jank

* temp bump

* Revert "temp bump"

This reverts commit 44c5113.
  • Loading branch information
haileyok authored Mar 31, 2024
1 parent 3f79cb3 commit 0ff7e71
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions patches/@mattermost+react-native-paste-input+0.6.4.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3594,3 +3594,19 @@ index 19b61ff..04a9951 100644
PasteInput_compileSdkVersion=30
PasteInput_buildToolsVersion=30.0.2
PasteInput_targetSdkVersion=30
diff --git a/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m b/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m
index e916023..0564d97 100644
--- a/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m
+++ b/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m
@@ -22,6 +22,11 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
_backedTextInputView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_backedTextInputView.textInputDelegate = self;

+ // Disable inline predictions to prevent jank in the composer
+ if (@available(iOS 17.0, *)) {
+ _backedTextInputView.inlinePredictionType = UITextInlinePredictionTypeNo;
+ }
+
[self addSubview:_backedTextInputView];
}

0 comments on commit 0ff7e71

Please sign in to comment.