Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@gspencergoog
Copy link
Contributor

This fixes the selection and deletion during text editing on macOS so that it can handle selections that have a base (selection start) that is after the extent (selection end) in the string.

Apparently the insertText:replacementRange on macOS can supply an NSRange object that has negative values for the length (even though the length is an unsigned NSUInteger). This change checks for that case, and fixes the range of characters replaced in the text to have the right bounds.

Also, I added an additional updateEditState after the state is set from the framework, since there is a timing problem: when the delete key is pressed, it sends an insertText message, which updates the framework state after the framework has already sent its state update to delete the selected region. This additional updateEditState puts the engine and framework back in sync again. Ideally, we would just avoid sending the insertText message, but there's really no way for the engine to know if the pressed key is part of an edit sequence or not.

@gspencergoog gspencergoog requested review from jason-simmons and stuartmorgan-g and removed request for stuartmorgan-g November 6, 2019 01:30
@gspencergoog
Copy link
Contributor Author

FYI @stuartmorgan

@gspencergoog gspencergoog merged commit 572e3d1 into flutter:master Nov 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Nov 6, 2019
[email protected]:flutter/engine.git/compare/6c763bb551cb...9726b4c

git log 6c763bb..9726b4c --no-merges --oneline
2019-11-06 [email protected] Roll src/third_party/skia f3d4109a793b..cdc0c23f1a2e (36 commits) (flutter/engine#13707)
2019-11-06 [email protected] Fix splash screen lookup. (#44131) (flutter/engine#13660)
2019-11-06 [email protected] Fix editing selection and deletion on macOS (flutter/engine#13702)
2019-11-06 [email protected] [web] Don't send keyboard events from text fields to flutter (flutter/engine#13699)


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

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/+/master/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Nov 6, 2019
[email protected]:flutter/engine.git/compare/6c763bb551cb...8ebb318

git log 6c763bb..8ebb318 --no-merges --oneline
2019-11-06 [email protected] Revert "Issues/39832 reland (#13642)" (flutter/engine#13720)
2019-11-06 [email protected] Ensure that the device pixel ratio is taken into account with window metrics in physical pixels. (flutter/engine#13708)
2019-11-06 [email protected] Fix NPE in splash screen lookup (flutter/engine#13719)
2019-11-06 [email protected] Roll src/third_party/skia 6e54a299cce9..6790423f84ef (11 commits) (flutter/engine#13718)
2019-11-06 [email protected] Roll src/third_party/dart 24f1f313a2..462a448ac8 (2 commits)
2019-11-06 [email protected] Roll src/third_party/dart 80fc4d54e5..24f1f313a2 (5 commits)
2019-11-06 [email protected] Roll src/third_party/skia f00524707da7..6e54a299cce9 (1 commits) (flutter/engine#13715)
2019-11-06 [email protected] Roll fuchsia/sdk/core/mac-amd64 from bCFtP... to 6Du8E... (flutter/engine#13714)
2019-11-06 [email protected] Roll src/third_party/dart 51016532e8..80fc4d54e5 (2 commits)
2019-11-06 [email protected] Roll src/third_party/skia cdc0c23f1a2e..f00524707da7 (2 commits) (flutter/engine#13712)
2019-11-06 [email protected] Roll src/third_party/dart 8bdca37e98..51016532e8 (21 commits)
2019-11-06 [email protected] Roll src/third_party/skia f3d4109a793b..cdc0c23f1a2e (36 commits) (flutter/engine#13707)
2019-11-06 [email protected] Fix splash screen lookup. (#44131) (flutter/engine#13660)
2019-11-06 [email protected] Fix editing selection and deletion on macOS (flutter/engine#13702)
2019-11-06 [email protected] [web] Don't send keyboard events from text fields to flutter (flutter/engine#13699)


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

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/+/master/autoroll/README.md
auto-submit bot pushed a commit that referenced this pull request May 26, 2023
…#42091)

Some context for this change flutter/flutter#118642 (comment) and flutter/flutter#118759 (comment) . Tldr, the use-case that this bouncing was originally introduced for in #13702 is no longer an issue.

This ack response is also not present on other desktop platforms or iOS.

Fixes [#118759](flutter/flutter#118759) and [#118642](flutter/flutter#118642)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants