Skip to content

[two_dimensional_scrollables] Add regression test#11376

Merged
auto-submit[bot] merged 2 commits intoflutter:mainfrom
Piinks:2d-137112
Mar 27, 2026
Merged

[two_dimensional_scrollables] Add regression test#11376
auto-submit[bot] merged 2 commits intoflutter:mainfrom
Piinks:2d-137112

Conversation

@Piinks
Copy link
Copy Markdown
Contributor

@Piinks Piinks commented Mar 27, 2026

Fixes flutter/flutter#137112

This PR adds a regression test for flutter/flutter#137112, where TableView would crash when focusing a widget outside of the table while a previously focused TextField inside the table was scrolled out of view.

While this issue appears to have been resolved by changes in the Flutter framework specifically flutter/flutter#135182 which addressed how focus keeps children alive in two-dimensional scrollables, this PR adds a dedicated test case to the package to ensure this behavior does not regress.

Pre-Review Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@Piinks Piinks added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package labels Mar 27, 2026
@github-actions github-actions bot added the triage-framework Should be looked at in framework triage label Mar 27, 2026
@Piinks
Copy link
Copy Markdown
Contributor Author

Piinks commented Mar 27, 2026

Reason for override: Just adding a test. :)

Copy link
Copy Markdown

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

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 adds a regression test to table_test.dart to ensure that TableView does not crash when focus shifts to an external widget while a previously focused cell is scrolled out of view. The reviewer suggests replacing magic numbers used for scroll offsets and cell extents with named constants or calculated values to improve test maintainability and readability.

@Piinks Piinks added the CICD Run CI/CD label Mar 27, 2026
Copy link
Copy Markdown
Contributor

@AbdeMohlbi AbdeMohlbi left a comment

Choose a reason for hiding this comment

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

SGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 27, 2026
@auto-submit auto-submit bot merged commit 4e8e8c4 into flutter:main Mar 27, 2026
81 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 30, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 30, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 30, 2026
flutter/packages@7ae082a...582f0e7

2026-03-30 49699333+dependabot[bot]@users.noreply.github.com Bump
lewagon/wait-on-check-action from 1.5.0 to 1.6.0 in the
all-github-actions group (flutter/packages#11388)
2026-03-28 tarrinneal@gmail.com [pigeon] bumps analyzer support to
between 10 and 12 (flutter/packages#11358)
2026-03-27 stuartmorgan@google.com Remove CODEOWNERS
(flutter/packages#11375)
2026-03-27 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
2c9eb20 to db50e20 (6 revisions) (flutter/packages#11380)
2026-03-27 116356835+AbdeMohlbi@users.noreply.github.com [Animations]
add example to `openCntainer` (flutter/packages#11189)
2026-03-27 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
2c9eb20 to db50e20 (6 revisions) (flutter/packages#11380)
2026-03-27 engine-flutter-autoroll@skia.org Roll Flutter from
e79bf6c to fb03253 (16 revisions) (flutter/packages#11379)
2026-03-27 katelovett@google.com [two_dimensional_scrollables] Add
regression test (flutter/packages#11376)

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-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

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

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
bkonyi pushed a commit to bkonyi/flutter that referenced this pull request Mar 30, 2026
…r#184341)

flutter/packages@7ae082a...582f0e7

2026-03-30 49699333+dependabot[bot]@users.noreply.github.com Bump
lewagon/wait-on-check-action from 1.5.0 to 1.6.0 in the
all-github-actions group (flutter/packages#11388)
2026-03-28 tarrinneal@gmail.com [pigeon] bumps analyzer support to
between 10 and 12 (flutter/packages#11358)
2026-03-27 stuartmorgan@google.com Remove CODEOWNERS
(flutter/packages#11375)
2026-03-27 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
2c9eb20 to db50e20 (6 revisions) (flutter/packages#11380)
2026-03-27 116356835+AbdeMohlbi@users.noreply.github.com [Animations]
add example to `openCntainer` (flutter/packages#11189)
2026-03-27 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
2c9eb20 to db50e20 (6 revisions) (flutter/packages#11380)
2026-03-27 engine-flutter-autoroll@skia.org Roll Flutter from
e79bf6c to fb03253 (16 revisions) (flutter/packages#11379)
2026-03-27 katelovett@google.com [two_dimensional_scrollables] Add
regression test (flutter/packages#11376)

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-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

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

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 CICD Run CI/CD override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[two_dimensional_scrollables] Table crashes when focusing outside of the table while focused text field is not in the view.

2 participants