From c4e7b738f676346e8bcf8bba407169c029ff158c Mon Sep 17 00:00:00 2001 From: importRyan Date: Thu, 19 Dec 2024 11:46:36 -0800 Subject: [PATCH] review: comment contents --- .../darwin/ios/framework/Source/FlutterTextInputPlugin.mm | 4 +++- .../darwin/ios/framework/Source/TextInputSemanticsObject.mm | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index 2f5c252898439..4ba6ed66a58a6 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -1293,7 +1293,9 @@ - (NSString*)textInRange:(UITextRange*)range { if (textRange.location == NSNotFound) { // Avoids [crashes](https://github.com/flutter/flutter/issues/138464) from an assertion // against NSNotFound. - // TODO(hellohuanlin): root cause https://github.com/flutter/flutter/issues/160100 + // TODO(hellohuanlin): This is a temp workaround, but we should look into why + // framework is providing NSNotFound to the engine. + // https://github.com/flutter/flutter/issues/160100 return nil; } // Sanitize the range to prevent going out of bounds. diff --git a/shell/platform/darwin/ios/framework/Source/TextInputSemanticsObject.mm b/shell/platform/darwin/ios/framework/Source/TextInputSemanticsObject.mm index 5d30415449bf6..0057d05e0effc 100644 --- a/shell/platform/darwin/ios/framework/Source/TextInputSemanticsObject.mm +++ b/shell/platform/darwin/ios/framework/Source/TextInputSemanticsObject.mm @@ -45,7 +45,9 @@ - (NSString*)textInRange:(UITextRange*)range { if (textRange.location == NSNotFound) { // Avoids [crashes](https://github.com/flutter/flutter/issues/138464) from an assertion // against NSNotFound. - // TODO(hellohuanlin): https://github.com/flutter/flutter/issues/160100 + // TODO(hellohuanlin): This is a temp workaround, but we should look into why + // framework is providing NSNotFound to the engine. + // https://github.com/flutter/flutter/issues/160100 return nil; } return [self.text substringWithRange:textRange];