Skip to content

Exclude the RawAutocomplete options overlay from the ambient focus traversal tree - #185543

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
victorsanni:autocomplete-tab-navigation
May 6, 2026
Merged

Exclude the RawAutocomplete options overlay from the ambient focus traversal tree#185543
auto-submit[bot] merged 4 commits into
flutter:masterfrom
victorsanni:autocomplete-tab-navigation

Conversation

@victorsanni

Copy link
Copy Markdown
Contributor

Exclude the options overlay from the ambient focus traversal tree.

Autocomplete options are navigated by arrow keys (via the widget's own shortcuts) and selected via Enter or tap, so they don't participate in TAB traversal. Without this, TAB from the field would detour into focusable items in the options overlay instead of advancing to the next form field.

Fixes Autocomplete blocks keyboard navigation using TAB

@github-actions github-actions Bot added the framework flutter/packages/flutter repository. See also f: labels. label Apr 24, 2026
@victorsanni victorsanni added the CICD Run CI/CD label Apr 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the RawAutocomplete widget to exclude its options overlay from the ambient focus traversal tree by wrapping it in an ExcludeFocus widget. This ensures that TAB navigation from the autocomplete field correctly advances to the next focusable sibling instead of entering the options overlay. A regression test has been added to verify this behavior. I have no feedback to provide.

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍 . I agree with the behavior. Thanks!

@victorsanni
victorsanni requested a review from Renzo-Olivares May 1, 2026 17:48
@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label May 4, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 4, 2026
@auto-submit

auto-submit Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/185543, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@github-actions github-actions Bot removed the CICD Run CI/CD label May 4, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 4, 2026

@Renzo-Olivares Renzo-Olivares left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocomplete blocks keyboard navigation using TAB

3 participants