Skip to content

Conversation

@justinmc
Copy link
Contributor

@justinmc justinmc commented Apr 14, 2023

Previously, the cursor might be put in the wrong place after choosing a spell check replacement on iOS. Now, it will always but put at the end of the new word.

Old New
cursor-pos-old cursor-pos

Fixes #124405

@justinmc justinmc requested a review from camsim99 April 14, 2023 17:36
@justinmc justinmc self-assigned this Apr 14, 2023
@flutter-dashboard flutter-dashboard bot added f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. labels Apr 14, 2023
@justinmc justinmc marked this pull request as ready for review April 14, 2023 18:16
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! Just left a question

}
});
editableTextState.hideToolbar();
editableTextState.renderEditable.selectWordEdge(cause: SelectionChangedCause.toolbar);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why this didn't work as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call was operating on the previous frame's TextEditingValue, so it didn't consider the userUpdateTextEditingValue call above. It was selecting the edge of the old word before that change.

@justinmc justinmc merged commit 39becb7 into flutter:master Apr 18, 2023
@justinmc justinmc deleted the spell-check-cupertino-edge branch April 18, 2023 17:18
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 18, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 18, 2023
flutter/flutter@15cb1f8...42fb0b2

2023-04-18 [email protected] Fix text theme dart fix cases (flutter/flutter#125052)
2023-04-18 [email protected] Update the copy icon in snippets and samples to use the standard one (flutter/flutter#123651)
2023-04-18 [email protected] Remove unused context parameter (flutter/flutter#124254)
2023-04-18 [email protected] iOS spell check cursor placement (flutter/flutter#124875)
2023-04-18 [email protected] Roll Flutter Engine from d2973619074e to 55bb065c607b (1 revision) (flutter/flutter#125047)
2023-04-18 [email protected] Stop running "_impeller_" benchmark variants (flutter/flutter#125044)
2023-04-18 [email protected] Roll Packages from 0277f2a to faf53fb (7 revisions) (flutter/flutter#125040)
2023-04-18 [email protected] Roll Flutter Engine from c4396f9f602f to d2973619074e (6 revisions) (flutter/flutter#125039)
2023-04-18 [email protected] Roll pub packages (flutter/flutter#125005)
2023-04-18 [email protected] [InputDatePickerFormField] adds acceptEmptyDate to InputDatePickerFormField Widget (flutter/flutter#124143)
2023-04-18 [email protected] relayout active ListWheelScrollView children every performLayout (flutter/flutter#124476)
2023-04-18 [email protected] Roll Flutter Engine from 4a603aaff32e to c4396f9f602f (2 revisions) (flutter/flutter#125007)
2023-04-18 [email protected] Roll Flutter Engine from 20034a8d62c4 to 4a603aaff32e (2 revisions) (flutter/flutter#125004)
2023-04-18 [email protected] Add optional axis specifier to static scrollable methods (flutter/flutter#124894)
2023-04-17 [email protected] Update usage of standalone`pub` executable in flutter_tools testing docs (flutter/flutter#124898)
2023-04-17 [email protected] Add Harish Anbalagan to AUTHORS (flutter/flutter#124684)
2023-04-17 [email protected] Roll Flutter Engine from b2d07388ceb6 to 20034a8d62c4 (7 revisions) (flutter/flutter#125001)
2023-04-17 [email protected] Add an example for SearchBar (flutter/flutter#124992)
2023-04-17 [email protected] SelectionContainer's listeners can remove itself during listener callâ�¦ (flutter/flutter#124624)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@reidbaker reidbaker mentioned this pull request Apr 21, 2023
8 tasks
justinmc added a commit to justinmc/flutter that referenced this pull request Apr 25, 2023
Fixes the cursor location after selecting a spell check result on iOS.
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
flutter/flutter@15cb1f8...42fb0b2

2023-04-18 [email protected] Fix text theme dart fix cases (flutter/flutter#125052)
2023-04-18 [email protected] Update the copy icon in snippets and samples to use the standard one (flutter/flutter#123651)
2023-04-18 [email protected] Remove unused context parameter (flutter/flutter#124254)
2023-04-18 [email protected] iOS spell check cursor placement (flutter/flutter#124875)
2023-04-18 [email protected] Roll Flutter Engine from d2973619074e to 55bb065c607b (1 revision) (flutter/flutter#125047)
2023-04-18 [email protected] Stop running "_impeller_" benchmark variants (flutter/flutter#125044)
2023-04-18 [email protected] Roll Packages from 0277f2a to faf53fb (7 revisions) (flutter/flutter#125040)
2023-04-18 [email protected] Roll Flutter Engine from c4396f9f602f to d2973619074e (6 revisions) (flutter/flutter#125039)
2023-04-18 [email protected] Roll pub packages (flutter/flutter#125005)
2023-04-18 [email protected] [InputDatePickerFormField] adds acceptEmptyDate to InputDatePickerFormField Widget (flutter/flutter#124143)
2023-04-18 [email protected] relayout active ListWheelScrollView children every performLayout (flutter/flutter#124476)
2023-04-18 [email protected] Roll Flutter Engine from 4a603aaff32e to c4396f9f602f (2 revisions) (flutter/flutter#125007)
2023-04-18 [email protected] Roll Flutter Engine from 20034a8d62c4 to 4a603aaff32e (2 revisions) (flutter/flutter#125004)
2023-04-18 [email protected] Add optional axis specifier to static scrollable methods (flutter/flutter#124894)
2023-04-17 [email protected] Update usage of standalone`pub` executable in flutter_tools testing docs (flutter/flutter#124898)
2023-04-17 [email protected] Add Harish Anbalagan to AUTHORS (flutter/flutter#124684)
2023-04-17 [email protected] Roll Flutter Engine from b2d07388ceb6 to 20034a8d62c4 (7 revisions) (flutter/flutter#125001)
2023-04-17 [email protected] Add an example for SearchBar (flutter/flutter#124992)
2023-04-17 [email protected] SelectionContainer's listeners can remove itself during listener callâ�¦ (flutter/flutter#124624)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After selecting a word suggestion in CupertinoTextField the cursor doesn't move

2 participants