This repository was archived by the owner on Feb 25, 2025. It is now read-only.
iOS UITextInput autocorrection prompt#13959
Merged
LongCatIsLooong merged 26 commits intoflutter:masterfrom Apr 7, 2020
Merged
Conversation
9 tasks
justinmc
approved these changes
Dec 3, 2019
| @@ -0,0 +1,32 @@ | |||
| // Copyright 2013 The Flutter Authors. All rights reserved. | |||
Contributor
There was a problem hiding this comment.
Should update the year to 2019.
Member
There was a problem hiding this comment.
2013 is the correct/approved year to use for all copyright dates in the engine. This has the effect of minimising our LICENSES text.
Contributor
There was a problem hiding this comment.
Whoops I have messed this up all over the place 😊 Thanks for the correction! I'll move these back to 2013 when I see them.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 8, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 8, 2020
This was referenced Apr 8, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 8, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 8, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 8, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 8, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 10, 2020
goderbauer
pushed a commit
to goderbauer/engine
that referenced
this pull request
Apr 16, 2020
8 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
Aug 2, 2023
) This PR disables the "auto-correction highlight" feature in iOS 17. This feature was introduced in flutter/flutter#45354 and #13959 (CC: @LongCatIsLooong who was the original author) I have created [a new issue](flutter/flutter#131622) to find other approaches to re-enable this feature. **Note that "auto-correction" itself still works, it's only the "highlight" part is disabled:** - iOS 16 with highlight: https://github.com/flutter/engine/assets/41930132/2fe7bbf6-f2db-4212-a020-e420ad8dd5e6 - iOS 17 without highlight: https://github.com/flutter/engine/assets/41930132/34f34743-6bef-4e93-80d2-d04c92ba59bf ## Why disable this feature? The original PR uses `UITextInput::firstRectForRange` API for auto-correction, since Apple does not provide any other API when auto-correction should show up, so the original PR used this API as a workaround. In iOS 17, Apple changed a few `UITextInput` behaviors: - UIKit does not query `UITextInput::firstRectForRange` for text range of the auto-corrected word any more. - But instead, it repeatedly queries every single character of the current word (after entering or deleting a character), regardless whether the word should be auto-corrected or not. I have tried all other `UITextInput` APIs that takes a text range, and none are suitable for auto-correction feature. As a result, I have to disable this feature for iOS 17 for now. *List which issues are fixed by this PR. You must list at least one issue.* Fixes flutter/flutter#128406 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
gaaclarke
pushed a commit
to gaaclarke/engine
that referenced
this pull request
Aug 30, 2023
…tter#44176) This PR disables the "auto-correction highlight" feature in iOS 17. This feature was introduced in flutter/flutter#45354 and flutter#13959 (CC: @LongCatIsLooong who was the original author) I have created [a new issue](flutter/flutter#131622) to find other approaches to re-enable this feature. **Note that "auto-correction" itself still works, it's only the "highlight" part is disabled:** - iOS 16 with highlight: https://github.com/flutter/engine/assets/41930132/2fe7bbf6-f2db-4212-a020-e420ad8dd5e6 - iOS 17 without highlight: https://github.com/flutter/engine/assets/41930132/34f34743-6bef-4e93-80d2-d04c92ba59bf ## Why disable this feature? The original PR uses `UITextInput::firstRectForRange` API for auto-correction, since Apple does not provide any other API when auto-correction should show up, so the original PR used this API as a workaround. In iOS 17, Apple changed a few `UITextInput` behaviors: - UIKit does not query `UITextInput::firstRectForRange` for text range of the auto-corrected word any more. - But instead, it repeatedly queries every single character of the current word (after entering or deleting a character), regardless whether the word should be auto-corrected or not. I have tried all other `UITextInput` APIs that takes a text range, and none are suitable for auto-correction feature. As a result, I have to disable this feature for iOS 17 for now. *List which issues are fixed by this PR. You must list at least one issue.* Fixes flutter/flutter#128406 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Framework PR: flutter/flutter#45354
Notifies the framework when
- (CGRect)firstRectForRange:(UITextRange*)rangegets called.Moved
FlutterTextInputViewtoFlutterTextInputPlugin.hso it can be referenced in my xctest.