Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListView (and other ScrollViews) should have a FocusTraversalGroup by default #69366

Open
Hixie opened this issue Oct 30, 2020 · 3 comments
Open
Labels
c: proposal A detailed proposal for a change to Flutter f: focus Focus traversal, gaining or losing focus f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@Hixie
Copy link
Contributor

Hixie commented Oct 30, 2020

Proposal: We should put a FocusTraversalGroup around ListView (and the other scroll views). Currently it's a bit weird that if you put a list view in a row, with a bunch of widgets in a box next to the row, the tab order is in and out of the list.

I'm not sure if this is a good idea; there may be reasons we should not do this.

cc @gspencergoog @goderbauer

@Hixie Hixie added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. f: focus Focus traversal, gaining or losing focus P3 Issues that are less important to the Flutter project labels Oct 30, 2020
@pedromassangocode pedromassangocode added passed first triage c: proposal A detailed proposal for a change to Flutter labels Oct 30, 2020
@gspencergoog
Copy link
Contributor

This seems reasonable, but I worry a little bit about the effects on apps that already have customized their traversal order the way they like it, or that want a traversal order that (for instance) goes across columns of lists instead of down. If there were groups in place around the lists that they couldn't remove, it would be pretty hard to make that happen.

In the default case, though, this seems like it would be a good thing.

@Hixie
Copy link
Contributor Author

Hixie commented Oct 30, 2020

We'd definitely want this to have an opt-out, like addAutomaticKeepAlives, addRepaintBoundaries, and addSemanticIndexes.

@tiloc
Copy link

tiloc commented May 14, 2021

I think there should also be some thought around how this would work with a builder-based ListView. I am currently struggling with a ListView where I am tabbing through the items on the view, but once I have tabbed to the last currently visible item on the bottom row, it doesn't build the next one, but rather starts tabbing through other elements on the screen (such as the Scaffold).

@flutter-triage-bot flutter-triage-bot bot added team-framework Owned by Framework team triaged-framework Triaged by Framework team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: proposal A detailed proposal for a change to Flutter f: focus Focus traversal, gaining or losing focus f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

No branches or pull requests

4 participants