Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Jun 13, 2023

Fixes #128749

The ScrollPositionAlignmentPolicy does not account for AxisDirection, which meant default focus traversal of reversed scrollables did not work. The policy doesn't know about the axis direction, so this is corrected in the ScrollPosition where all the information is available before calling on the viewport for the new target scroll offset.

This fixes that by flipping the policy (unless explicit) so that focus traversal works.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Piinks Piinks added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. f: focus Focus traversal, gaining or losing focus labels Jun 13, 2023
@Piinks Piinks requested a review from gspencergoog June 13, 2023 01:50
@github-actions github-actions bot removed f: focus Focus traversal, gaining or losing focus a: text input Entering text in a text field or keyboard related problems labels Jun 13, 2023
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Thanks for fixing that!

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2023
@auto-submit auto-submit bot merged commit a0bfde9 into flutter:master Jun 13, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 14, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 14, 2023
Manual roll requested by [email protected]

flutter/flutter@09b7e56...95be76a

2023-06-14 [email protected] [web] Migrate framework away from dart:html and package:js (flutter/flutter#128580)
2023-06-14 [email protected] Fixed slider value indicator not disappearing after a bit on desktop platform when slider is clicked not dragged (flutter/flutter#128137)
2023-06-14 [email protected] Inline AbstractNode into SemanticsNode and Layer (flutter/flutter#128467)
2023-06-14 [email protected] Roll Flutter Engine from 727b4413fe6f to 2d8d5ecfe4a8 (5 revisions) (flutter/flutter#128842)
2023-06-14 [email protected] Roll Flutter Engine from 66a5761412f9 to 727b4413fe6f (10 revisions) (flutter/flutter#128841)
2023-06-14 [email protected] Roll Flutter Engine from b6bf3a6f1ccd to 66a5761412f9 (1 revision) (flutter/flutter#128813)
2023-06-13 [email protected] Fix syntax error in docstring (flutter/flutter#128692)
2023-06-13 [email protected] Update unit tests in material library for Material 3 (flutter/flutter#128725)
2023-06-13 [email protected] [flutter_tools] Suppress git output in flutter channel (flutter/flutter#128475)
2023-06-13 [email protected] Fix ensureVisible and default focus traversal for reversed scrollables (flutter/flutter#128756)
2023-06-13 [email protected] Roll Flutter Engine from f9a0a0dafeea to b6bf3a6f1ccd (2 revisions) (flutter/flutter#128797)
2023-06-13 [email protected] Update rest of the unit tests in material library for Material 3 (flutter/flutter#128747)
2023-06-13 [email protected] Update tests in material library for Material 3 by default (flutter/flutter#128300)
2023-06-13 [email protected] Update misc tests for Material3 (flutter/flutter#128712)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

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/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default focus traversal does not work on reversed scrollables

2 participants