Skip to content

Commit

Permalink
Do not bounce editing state back to framework on SetEditState
Browse files Browse the repository at this point in the history
  • Loading branch information
Renzo-Olivares committed May 17, 2023
1 parent d06b4ab commit 4675f7e
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,19 +448,6 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
} else if ([method isEqualToString:kSetEditingStateMethod]) {
NSDictionary* state = call.arguments;
[self setEditingState:state];

// Close the loop, since the framework state could have been updated by the
// engine since it sent this update, and needs to now be made to match the
// engine's version of the state.
if (!_enableDeltaModel) {
[self updateEditState];
} else {
// Send an "empty" delta. The client can compare the old_text with their
// current text and update with that if the race condition described above
// occurs.
[self updateEditStateWithDelta:flutter::TextEditingDelta(_activeModel->GetText().c_str(),
flutter::TextRange(0, 0), "")];
}
} else if ([method isEqualToString:kSetEditableSizeAndTransform]) {
NSDictionary* state = call.arguments;
[self setEditableTransform:state[kTransformKey]];
Expand Down

0 comments on commit 4675f7e

Please sign in to comment.