This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix editing selection and deletion on macOS #13702
Merged
Merged
Conversation
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
Contributor
Author
|
FYI @stuartmorgan |
jason-simmons
approved these changes
Nov 6, 2019
d6e4301 to
8a7b1dc
Compare
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
This was referenced 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
8 tasks
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.
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.
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
NSRangeobject 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
updateEditStateafter the state is set from the framework, since there is a timing problem: when the delete key is pressed, it sends aninsertTextmessage, which updates the framework state after the framework has already sent its state update to delete the selected region. This additionalupdateEditStateputs the engine and framework back in sync again. Ideally, we would just avoid sending theinsertTextmessage, but there's really no way for the engine to know if the pressed key is part of an edit sequence or not.