Keep the selection after 'Copy' pressed on iOS.#76327
Merged
fluttergithubbot merged 5 commits intoflutter:masterfrom Feb 23, 2021
Merged
Keep the selection after 'Copy' pressed on iOS.#76327fluttergithubbot merged 5 commits intoflutter:masterfrom
fluttergithubbot merged 5 commits intoflutter:masterfrom
Conversation
LongCatIsLooong
approved these changes
Feb 18, 2021
| @@ -774,7 +774,7 @@ abstract class TextSelectionDelegate { | |||
| set textEditingValue(TextEditingValue value); | |||
|
|
|||
| /// Hides the text selection toolbar. | |||
Contributor
There was a problem hiding this comment.
nit: documentation of the optional parameter.
Contributor
Author
There was a problem hiding this comment.
Good call, I think this was a bit confusing overall. I added a bunch of comments to make this more clear, and I renamed the parameter from handlesOnly to hideHandles.
| delegate.bringIntoView(delegate.textEditingValue.selection.extent); | ||
| // Hide the toolbar, but maintain the existing selection and keep the | ||
| // handles on the screen. | ||
| delegate.hideToolbar(true); |
Contributor
There was a problem hiding this comment.
I think ideally this should depend on what platform it is, since the material "copy" should have the same behavior on iOS.
Contributor
Author
There was a problem hiding this comment.
That's a good point. I can get rid of this handleCopy override entirely then, and just put the switch statement in the main handleCopy for all platforms.
…n using the iOS toolbar on Android
8 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, Flutter hid the toolbar and collapsed the selection after "Copy" was pressed in the text selection toolbar. On native iOS though, the handles should stay visible and the selection should remain.
Screen.Recording.2021-02-18.at.12.16.13.PM.mov
Fixes #72124