Hide autocomplete menu on select.#100251
Merged
fluttergithubbot merged 1 commit intoflutter:masterfrom Mar 22, 2022
Merged
Conversation
justinmc
approved these changes
Mar 17, 2022
| return; | ||
| } | ||
|
|
||
| _floatingOptions?.remove(); |
Contributor
There was a problem hiding this comment.
Good call pulling this out of the conditionals.
| // Hide or show the options overlay, if needed. | ||
| void _updateOverlay() { | ||
| _setActionsEnabled(_focusNode.hasFocus && _selection == null && _options.isNotEmpty); | ||
| if (SchedulerBinding.instance.schedulerPhase == SchedulerPhase.persistentCallbacks) { |
Contributor
There was a problem hiding this comment.
So the problem was that _updateOverlay was called on a tap callback, in the persistentCallbacks phase, and so the OverlayEntry was updated for the previous frame?
Contributor
Author
There was a problem hiding this comment.
No tap callbacks should never be called in persistent callbacks.
The problem was if the text isn't changed by the tap, it's not going to call _updateOverlay so that shouldShowOptions isn't getting re-evaluated.
This is just a small change to make sure the caller of _updateOverlay doesn't have to know whether it's safe to do an overlay update right away or it has to schedule an update.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 22, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Mar 29, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Mar 29, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Mar 29, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Mar 29, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Mar 29, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Mar 29, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Mar 29, 2022
9 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.
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.